STM32F439xx HAL User Manual
Functions
IO operation functions
DMA2D Exported Functions

IO operation functions. More...

Functions

HAL_StatusTypeDef HAL_DMA2D_Start (DMA2D_HandleTypeDef *hdma2d, uint32_t pdata, uint32_t DstAddress, uint32_t Width, uint32_t Height)
 Start the DMA2D Transfer.
HAL_StatusTypeDef HAL_DMA2D_Start_IT (DMA2D_HandleTypeDef *hdma2d, uint32_t pdata, uint32_t DstAddress, uint32_t Width, uint32_t Height)
 Start the DMA2D Transfer with interrupt enabled.
HAL_StatusTypeDef HAL_DMA2D_BlendingStart (DMA2D_HandleTypeDef *hdma2d, uint32_t SrcAddress1, uint32_t SrcAddress2, uint32_t DstAddress, uint32_t Width, uint32_t Height)
 Start the multi-source DMA2D Transfer.
HAL_StatusTypeDef HAL_DMA2D_BlendingStart_IT (DMA2D_HandleTypeDef *hdma2d, uint32_t SrcAddress1, uint32_t SrcAddress2, uint32_t DstAddress, uint32_t Width, uint32_t Height)
 Start the multi-source DMA2D Transfer with interrupt enabled.
HAL_StatusTypeDef HAL_DMA2D_Abort (DMA2D_HandleTypeDef *hdma2d)
 Abort the DMA2D Transfer.
HAL_StatusTypeDef HAL_DMA2D_Suspend (DMA2D_HandleTypeDef *hdma2d)
 Suspend the DMA2D Transfer.
HAL_StatusTypeDef HAL_DMA2D_Resume (DMA2D_HandleTypeDef *hdma2d)
 Resume the DMA2D Transfer.
HAL_StatusTypeDef HAL_DMA2D_EnableCLUT (DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx)
 Enable the DMA2D CLUT Transfer.
HAL_StatusTypeDef HAL_DMA2D_CLUTLoad (DMA2D_HandleTypeDef *hdma2d, DMA2D_CLUTCfgTypeDef CLUTCfg, uint32_t LayerIdx)
 Start DMA2D CLUT Loading.
HAL_StatusTypeDef HAL_DMA2D_CLUTLoad_IT (DMA2D_HandleTypeDef *hdma2d, DMA2D_CLUTCfgTypeDef CLUTCfg, uint32_t LayerIdx)
 Start DMA2D CLUT Loading with interrupt enabled.
HAL_StatusTypeDef HAL_DMA2D_CLUTLoading_Abort (DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx)
 Abort the DMA2D CLUT loading.
HAL_StatusTypeDef HAL_DMA2D_CLUTLoading_Suspend (DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx)
 Suspend the DMA2D CLUT loading.
HAL_StatusTypeDef HAL_DMA2D_CLUTLoading_Resume (DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx)
 Resume the DMA2D CLUT loading.
HAL_StatusTypeDef HAL_DMA2D_PollForTransfer (DMA2D_HandleTypeDef *hdma2d, uint32_t Timeout)
 Polling for transfer complete or CLUT loading.
void HAL_DMA2D_IRQHandler (DMA2D_HandleTypeDef *hdma2d)
 Handle DMA2D interrupt request.
__weak void HAL_DMA2D_LineEventCallback (DMA2D_HandleTypeDef *hdma2d)
 Transfer watermark callback.
__weak void HAL_DMA2D_CLUTLoadingCpltCallback (DMA2D_HandleTypeDef *hdma2d)
 CLUT Transfer Complete callback.

Detailed Description

IO operation functions.

 ===============================================================================
                      #####  IO operation functions  #####
 ===============================================================================
    [..]  This section provides functions allowing to:
      (+) Configure the pdata, destination address and data size then
          start the DMA2D transfer.
      (+) Configure the source for foreground and background, destination address
          and data size then start a MultiBuffer DMA2D transfer.
      (+) Configure the pdata, destination address and data size then
          start the DMA2D transfer with interrupt.
      (+) Configure the source for foreground and background, destination address
          and data size then start a MultiBuffer DMA2D transfer with interrupt.
      (+) Abort DMA2D transfer.
      (+) Suspend DMA2D transfer.
      (+) Resume DMA2D transfer.
      (+) Enable CLUT transfer.
      (+) Configure CLUT loading then start transfer in polling mode.
      (+) Configure CLUT loading then start transfer in interrupt mode.
      (+) Abort DMA2D CLUT loading.
      (+) Suspend DMA2D CLUT loading.
      (+) Resume DMA2D CLUT loading.
      (+) Poll for transfer complete.
      (+) handle DMA2D interrupt request.
      (+) Transfer watermark callback.
      (+) CLUT Transfer Complete callback.


Function Documentation

HAL_StatusTypeDef HAL_DMA2D_Abort ( DMA2D_HandleTypeDef hdma2d)

Abort the DMA2D Transfer.

Parameters:
hdma2dpointer to a DMA2D_HandleTypeDef structure that contains the configuration information for the DMA2D.
Return values:
HALstatus

Definition at line 564 of file stm32f4xx_hal_dma2d.c.

References __HAL_DMA2D_DISABLE_IT, DMA2D_IT_CE, DMA2D_IT_TC, DMA2D_IT_TE, DMA2D_TIMEOUT_ABORT, __DMA2D_HandleTypeDef::ErrorCode, HAL_DMA2D_ERROR_TIMEOUT, HAL_DMA2D_STATE_READY, HAL_DMA2D_STATE_TIMEOUT, HAL_GetTick(), __DMA2D_HandleTypeDef::Instance, and __DMA2D_HandleTypeDef::State.

Referenced by HAL_DMA2D_DeInit().

HAL_StatusTypeDef HAL_DMA2D_BlendingStart ( DMA2D_HandleTypeDef hdma2d,
uint32_t  SrcAddress1,
uint32_t  SrcAddress2,
uint32_t  DstAddress,
uint32_t  Width,
uint32_t  Height 
)

Start the multi-source DMA2D Transfer.

Parameters:
hdma2dPointer to a DMA2D_HandleTypeDef structure that contains the configuration information for the DMA2D.
SrcAddress1The source memory Buffer address for the foreground layer.
SrcAddress2The source memory Buffer address for the background layer.
DstAddressThe destination memory Buffer address.
WidthThe width of data to be transferred from source to destination (expressed in number of pixels per line).
HeightThe height of data to be transferred from source to destination (expressed in number of lines).
Return values:
HALstatus

Definition at line 496 of file stm32f4xx_hal_dma2d.c.

References __HAL_DMA2D_ENABLE, assert_param, DMA2D_SetConfig(), HAL_DMA2D_STATE_BUSY, __DMA2D_HandleTypeDef::Instance, IS_DMA2D_LINE, IS_DMA2D_PIXEL, and __DMA2D_HandleTypeDef::State.

HAL_StatusTypeDef HAL_DMA2D_BlendingStart_IT ( DMA2D_HandleTypeDef hdma2d,
uint32_t  SrcAddress1,
uint32_t  SrcAddress2,
uint32_t  DstAddress,
uint32_t  Width,
uint32_t  Height 
)

Start the multi-source DMA2D Transfer with interrupt enabled.

Parameters:
hdma2dPointer to a DMA2D_HandleTypeDef structure that contains the configuration information for the DMA2D.
SrcAddress1The source memory Buffer address for the foreground layer.
SrcAddress2The source memory Buffer address for the background layer.
DstAddressThe destination memory Buffer address.
WidthThe width of data to be transferred from source to destination (expressed in number of pixels per line).
HeightThe height of data to be transferred from source to destination (expressed in number of lines).
Return values:
HALstatus

Definition at line 531 of file stm32f4xx_hal_dma2d.c.

References __HAL_DMA2D_ENABLE, __HAL_DMA2D_ENABLE_IT, assert_param, DMA2D_IT_CE, DMA2D_IT_TC, DMA2D_IT_TE, DMA2D_SetConfig(), HAL_DMA2D_STATE_BUSY, __DMA2D_HandleTypeDef::Instance, IS_DMA2D_LINE, IS_DMA2D_PIXEL, and __DMA2D_HandleTypeDef::State.

HAL_StatusTypeDef HAL_DMA2D_CLUTLoad ( DMA2D_HandleTypeDef hdma2d,
DMA2D_CLUTCfgTypeDef  CLUTCfg,
uint32_t  LayerIdx 
)

Start DMA2D CLUT Loading.

Parameters:
hdma2dPointer to a DMA2D_HandleTypeDef structure that contains the configuration information for the DMA2D.
CLUTCfgPointer to a DMA2D_CLUTCfgTypeDef structure that contains the configuration information for the color look up table.
LayerIdxDMA2D Layer index. This parameter can be one of the following values: 0(background) / 1(foreground)
Note:
Invoking this API is similar to calling HAL_DMA2D_ConfigCLUT() then HAL_DMA2D_EnableCLUT().
Return values:
HALstatus

Definition at line 727 of file stm32f4xx_hal_dma2d.c.

References assert_param, DMA2D_CLUTCfgTypeDef::CLUTColorMode, DMA2D_POSITION_BGPFCCR_CCM, DMA2D_POSITION_BGPFCCR_CS, DMA2D_POSITION_FGPFCCR_CCM, HAL_DMA2D_STATE_BUSY, __DMA2D_HandleTypeDef::Instance, IS_DMA2D_CLUT_CM, IS_DMA2D_CLUT_SIZE, IS_DMA2D_LAYER, DMA2D_CLUTCfgTypeDef::pCLUT, DMA2D_CLUTCfgTypeDef::Size, and __DMA2D_HandleTypeDef::State.

HAL_StatusTypeDef HAL_DMA2D_CLUTLoad_IT ( DMA2D_HandleTypeDef hdma2d,
DMA2D_CLUTCfgTypeDef  CLUTCfg,
uint32_t  LayerIdx 
)

Start DMA2D CLUT Loading with interrupt enabled.

Parameters:
hdma2dPointer to a DMA2D_HandleTypeDef structure that contains the configuration information for the DMA2D.
CLUTCfgPointer to a DMA2D_CLUTCfgTypeDef structure that contains the configuration information for the color look up table.
LayerIdxDMA2D Layer index. This parameter can be one of the following values: 0(background) / 1(foreground)
Return values:
HALstatus

Definition at line 781 of file stm32f4xx_hal_dma2d.c.

References __HAL_DMA2D_ENABLE_IT, assert_param, DMA2D_CLUTCfgTypeDef::CLUTColorMode, DMA2D_IT_CAE, DMA2D_IT_CE, DMA2D_IT_CTC, DMA2D_IT_TE, DMA2D_POSITION_BGPFCCR_CCM, DMA2D_POSITION_BGPFCCR_CS, DMA2D_POSITION_FGPFCCR_CCM, HAL_DMA2D_STATE_BUSY, __DMA2D_HandleTypeDef::Instance, IS_DMA2D_CLUT_CM, IS_DMA2D_CLUT_SIZE, IS_DMA2D_LAYER, DMA2D_CLUTCfgTypeDef::pCLUT, DMA2D_CLUTCfgTypeDef::Size, and __DMA2D_HandleTypeDef::State.

HAL_StatusTypeDef HAL_DMA2D_CLUTLoading_Abort ( DMA2D_HandleTypeDef hdma2d,
uint32_t  LayerIdx 
)

Abort the DMA2D CLUT loading.

Parameters:
hdma2dPointer to a DMA2D_HandleTypeDef structure that contains the configuration information for the DMA2D.
LayerIdxDMA2D Layer index. This parameter can be one of the following values: 0(background) / 1(foreground)
Return values:
HALstatus

Definition at line 839 of file stm32f4xx_hal_dma2d.c.

References __HAL_DMA2D_DISABLE_IT, DMA2D_IT_CAE, DMA2D_IT_CE, DMA2D_IT_CTC, DMA2D_IT_TE, DMA2D_TIMEOUT_ABORT, __DMA2D_HandleTypeDef::ErrorCode, HAL_DMA2D_ERROR_TIMEOUT, HAL_DMA2D_STATE_READY, HAL_DMA2D_STATE_TIMEOUT, HAL_GetTick(), __DMA2D_HandleTypeDef::Instance, and __DMA2D_HandleTypeDef::State.

Referenced by HAL_DMA2D_DeInit().

HAL_StatusTypeDef HAL_DMA2D_CLUTLoading_Resume ( DMA2D_HandleTypeDef hdma2d,
uint32_t  LayerIdx 
)

Resume the DMA2D CLUT loading.

Parameters:
hdma2dpointer to a DMA2D_HandleTypeDef structure that contains the configuration information for the DMA2D.
LayerIdxDMA2D Layer index. This parameter can be one of the following values: 0(background) / 1(foreground)
Return values:
HALstatus

Definition at line 952 of file stm32f4xx_hal_dma2d.c.

References HAL_DMA2D_STATE_BUSY, __DMA2D_HandleTypeDef::Instance, and __DMA2D_HandleTypeDef::State.

HAL_StatusTypeDef HAL_DMA2D_CLUTLoading_Suspend ( DMA2D_HandleTypeDef hdma2d,
uint32_t  LayerIdx 
)

Suspend the DMA2D CLUT loading.

Parameters:
hdma2dPointer to a DMA2D_HandleTypeDef structure that contains the configuration information for the DMA2D.
LayerIdxDMA2D Layer index. This parameter can be one of the following values: 0(background) / 1(foreground)
Return values:
HALstatus

Definition at line 895 of file stm32f4xx_hal_dma2d.c.

References DMA2D_TIMEOUT_SUSPEND, __DMA2D_HandleTypeDef::ErrorCode, HAL_DMA2D_ERROR_TIMEOUT, HAL_DMA2D_STATE_SUSPEND, HAL_DMA2D_STATE_TIMEOUT, HAL_GetTick(), __DMA2D_HandleTypeDef::Instance, and __DMA2D_HandleTypeDef::State.

CLUT Transfer Complete callback.

Parameters:
hdma2dpointer to a DMA2D_HandleTypeDef structure that contains the configuration information for the DMA2D.
Return values:
None

Definition at line 1291 of file stm32f4xx_hal_dma2d.c.

Referenced by HAL_DMA2D_IRQHandler().

HAL_StatusTypeDef HAL_DMA2D_EnableCLUT ( DMA2D_HandleTypeDef hdma2d,
uint32_t  LayerIdx 
)

Enable the DMA2D CLUT Transfer.

Parameters:
hdma2dPointer to a DMA2D_HandleTypeDef structure that contains the configuration information for the DMA2D.
LayerIdxDMA2D Layer index. This parameter can be one of the following values: 0(background) / 1(foreground)
Return values:
HALstatus

Definition at line 690 of file stm32f4xx_hal_dma2d.c.

References assert_param, HAL_DMA2D_STATE_BUSY, __DMA2D_HandleTypeDef::Instance, IS_DMA2D_LAYER, and __DMA2D_HandleTypeDef::State.

Transfer watermark callback.

Parameters:
hdma2dpointer to a DMA2D_HandleTypeDef structure that contains the configuration information for the DMA2D.
Return values:
None

Definition at line 1275 of file stm32f4xx_hal_dma2d.c.

Referenced by HAL_DMA2D_IRQHandler().

HAL_StatusTypeDef HAL_DMA2D_PollForTransfer ( DMA2D_HandleTypeDef hdma2d,
uint32_t  Timeout 
)

Polling for transfer complete or CLUT loading.

Parameters:
hdma2dPointer to a DMA2D_HandleTypeDef structure that contains the configuration information for the DMA2D.
TimeoutTimeout duration
Return values:
HALstatus

Definition at line 989 of file stm32f4xx_hal_dma2d.c.

References __HAL_DMA2D_CLEAR_FLAG, __HAL_DMA2D_GET_FLAG, DMA2D_FLAG_CAE, DMA2D_FLAG_CE, DMA2D_FLAG_CTC, DMA2D_FLAG_TC, DMA2D_FLAG_TE, __DMA2D_HandleTypeDef::ErrorCode, HAL_DMA2D_ERROR_CAE, HAL_DMA2D_ERROR_CE, HAL_DMA2D_ERROR_TE, HAL_DMA2D_ERROR_TIMEOUT, HAL_DMA2D_STATE_ERROR, HAL_DMA2D_STATE_READY, HAL_DMA2D_STATE_TIMEOUT, HAL_GetTick(), __DMA2D_HandleTypeDef::Instance, and __DMA2D_HandleTypeDef::State.

HAL_StatusTypeDef HAL_DMA2D_Resume ( DMA2D_HandleTypeDef hdma2d)

Resume the DMA2D Transfer.

Parameters:
hdma2dpointer to a DMA2D_HandleTypeDef structure that contains the configuration information for the DMA2D.
Return values:
HALstatus

Definition at line 663 of file stm32f4xx_hal_dma2d.c.

References HAL_DMA2D_STATE_BUSY, __DMA2D_HandleTypeDef::Instance, and __DMA2D_HandleTypeDef::State.

HAL_StatusTypeDef HAL_DMA2D_Start ( DMA2D_HandleTypeDef hdma2d,
uint32_t  pdata,
uint32_t  DstAddress,
uint32_t  Width,
uint32_t  Height 
)

Start the DMA2D Transfer.

Parameters:
hdma2dPointer to a DMA2D_HandleTypeDef structure that contains the configuration information for the DMA2D.
pdataConfigure the source memory Buffer address if Memory-to-Memory or Memory-to-Memory with pixel format conversion mode is selected, or configure the color value if Register-to-Memory mode is selected.
DstAddressThe destination memory Buffer address.
WidthThe width of data to be transferred from source to destination (expressed in number of pixels per line).
HeightThe height of data to be transferred from source to destination (expressed in number of lines).
Return values:
HALstatus

Definition at line 427 of file stm32f4xx_hal_dma2d.c.

References __HAL_DMA2D_ENABLE, assert_param, DMA2D_SetConfig(), HAL_DMA2D_STATE_BUSY, IS_DMA2D_LINE, IS_DMA2D_PIXEL, and __DMA2D_HandleTypeDef::State.

HAL_StatusTypeDef HAL_DMA2D_Start_IT ( DMA2D_HandleTypeDef hdma2d,
uint32_t  pdata,
uint32_t  DstAddress,
uint32_t  Width,
uint32_t  Height 
)

Start the DMA2D Transfer with interrupt enabled.

Parameters:
hdma2dPointer to a DMA2D_HandleTypeDef structure that contains the configuration information for the DMA2D.
pdataConfigure the source memory Buffer address if the Memory-to-Memory or Memory-to-Memory with pixel format conversion mode is selected, or configure the color value if Register-to-Memory mode is selected.
DstAddressThe destination memory Buffer address.
WidthThe width of data to be transferred from source to destination (expressed in number of pixels per line).
HeightThe height of data to be transferred from source to destination (expressed in number of lines).
Return values:
HALstatus

Definition at line 461 of file stm32f4xx_hal_dma2d.c.

References __HAL_DMA2D_ENABLE, __HAL_DMA2D_ENABLE_IT, assert_param, DMA2D_IT_CE, DMA2D_IT_TC, DMA2D_IT_TE, DMA2D_SetConfig(), HAL_DMA2D_STATE_BUSY, IS_DMA2D_LINE, IS_DMA2D_PIXEL, and __DMA2D_HandleTypeDef::State.

HAL_StatusTypeDef HAL_DMA2D_Suspend ( DMA2D_HandleTypeDef hdma2d)

Suspend the DMA2D Transfer.

Parameters:
hdma2dpointer to a DMA2D_HandleTypeDef structure that contains the configuration information for the DMA2D.
Return values:
HALstatus

Definition at line 613 of file stm32f4xx_hal_dma2d.c.

References DMA2D_TIMEOUT_SUSPEND, __DMA2D_HandleTypeDef::ErrorCode, HAL_DMA2D_ERROR_TIMEOUT, HAL_DMA2D_STATE_SUSPEND, HAL_DMA2D_STATE_TIMEOUT, HAL_GetTick(), __DMA2D_HandleTypeDef::Instance, and __DMA2D_HandleTypeDef::State.