STM32L4xx_HAL_Driver  1.14.0
stm32l4xx_hal_dma2d.h File Reference

Header file of DMA2D HAL module. More...

Go to the source code of this file.

Data Structures

struct  DMA2D_CLUTCfgTypeDef
 DMA2D CLUT Structure definition. More...
 
struct  DMA2D_InitTypeDef
 DMA2D Init structure definition. More...
 
struct  DMA2D_LayerCfgTypeDef
 DMA2D Layer structure definition. More...
 
struct  __DMA2D_HandleTypeDef
 DMA2D handle Structure definition. More...
 

Typedefs

typedef struct __DMA2D_HandleTypeDef DMA2D_HandleTypeDef
 DMA2D handle Structure definition. More...
 
typedef void(* pDMA2D_CallbackTypeDef) (DMA2D_HandleTypeDef *hdma2d)
 HAL DMA2D Callback pointer definition. More...
 

Enumerations

enum  HAL_DMA2D_StateTypeDef {
  HAL_DMA2D_STATE_RESET = 0x00U, HAL_DMA2D_STATE_READY = 0x01U, HAL_DMA2D_STATE_BUSY = 0x02U, HAL_DMA2D_STATE_TIMEOUT = 0x03U,
  HAL_DMA2D_STATE_ERROR = 0x04U, HAL_DMA2D_STATE_SUSPEND = 0x05U
}
 HAL DMA2D State structures definition. More...
 
enum  HAL_DMA2D_CallbackIDTypeDef {
  HAL_DMA2D_MSPINIT_CB_ID = 0x00U, HAL_DMA2D_MSPDEINIT_CB_ID = 0x01U, HAL_DMA2D_TRANSFERCOMPLETE_CB_ID = 0x02U, HAL_DMA2D_TRANSFERERROR_CB_ID = 0x03U,
  HAL_DMA2D_LINEEVENT_CB_ID = 0x04U, HAL_DMA2D_CLUTLOADINGCPLT_CB_ID = 0x05U
}
 HAL DMA2D common Callback ID enumeration definition. More...
 

Functions

HAL_StatusTypeDef HAL_DMA2D_Init (DMA2D_HandleTypeDef *hdma2d)
 Initialize the DMA2D according to the specified parameters in the DMA2D_InitTypeDef and create the associated handle. More...
 
HAL_StatusTypeDef HAL_DMA2D_DeInit (DMA2D_HandleTypeDef *hdma2d)
 Deinitializes the DMA2D peripheral registers to their default reset values. More...
 
void HAL_DMA2D_MspInit (DMA2D_HandleTypeDef *hdma2d)
 Initializes the DMA2D MSP. More...
 
void HAL_DMA2D_MspDeInit (DMA2D_HandleTypeDef *hdma2d)
 DeInitializes the DMA2D MSP. More...
 
HAL_StatusTypeDef HAL_DMA2D_RegisterCallback (DMA2D_HandleTypeDef *hdma2d, HAL_DMA2D_CallbackIDTypeDef CallbackID, pDMA2D_CallbackTypeDef pCallback)
 Register a User DMA2D Callback To be used instead of the weak (surcharged) predefined callback. More...
 
HAL_StatusTypeDef HAL_DMA2D_UnRegisterCallback (DMA2D_HandleTypeDef *hdma2d, HAL_DMA2D_CallbackIDTypeDef CallbackID)
 Unregister a DMA2D Callback DMA2D Callback is redirected to the weak (surcharged) predefined callback. More...
 
HAL_StatusTypeDef HAL_DMA2D_Start (DMA2D_HandleTypeDef *hdma2d, uint32_t pdata, uint32_t DstAddress, uint32_t Width, uint32_t Height)
 Start the DMA2D Transfer. More...
 
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. More...
 
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. More...
 
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. More...
 
HAL_StatusTypeDef HAL_DMA2D_Suspend (DMA2D_HandleTypeDef *hdma2d)
 Suspend the DMA2D Transfer. More...
 
HAL_StatusTypeDef HAL_DMA2D_Resume (DMA2D_HandleTypeDef *hdma2d)
 Resume the DMA2D Transfer. More...
 
HAL_StatusTypeDef HAL_DMA2D_Abort (DMA2D_HandleTypeDef *hdma2d)
 Abort the DMA2D Transfer. More...
 
HAL_StatusTypeDef HAL_DMA2D_EnableCLUT (DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx)
 Enable the DMA2D CLUT Transfer. More...
 
HAL_StatusTypeDef HAL_DMA2D_CLUTLoad (DMA2D_HandleTypeDef *hdma2d, DMA2D_CLUTCfgTypeDef CLUTCfg, uint32_t LayerIdx)
 Start DMA2D CLUT Loading. More...
 
HAL_StatusTypeDef HAL_DMA2D_CLUTLoad_IT (DMA2D_HandleTypeDef *hdma2d, DMA2D_CLUTCfgTypeDef CLUTCfg, uint32_t LayerIdx)
 Start DMA2D CLUT Loading with interrupt enabled. More...
 
HAL_StatusTypeDef HAL_DMA2D_CLUTLoading_Abort (DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx)
 Abort the DMA2D CLUT loading. More...
 
HAL_StatusTypeDef HAL_DMA2D_CLUTLoading_Suspend (DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx)
 Suspend the DMA2D CLUT loading. More...
 
HAL_StatusTypeDef HAL_DMA2D_CLUTLoading_Resume (DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx)
 Resume the DMA2D CLUT loading. More...
 
HAL_StatusTypeDef HAL_DMA2D_PollForTransfer (DMA2D_HandleTypeDef *hdma2d, uint32_t Timeout)
 Polling for transfer complete or CLUT loading. More...
 
void HAL_DMA2D_IRQHandler (DMA2D_HandleTypeDef *hdma2d)
 Handle DMA2D interrupt request. More...
 
void HAL_DMA2D_LineEventCallback (DMA2D_HandleTypeDef *hdma2d)
 Transfer watermark callback. More...
 
void HAL_DMA2D_CLUTLoadingCpltCallback (DMA2D_HandleTypeDef *hdma2d)
 CLUT Transfer Complete callback. More...
 
HAL_StatusTypeDef HAL_DMA2D_ConfigLayer (DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx)
 Configure the DMA2D Layer according to the specified parameters in the DMA2D_HandleTypeDef. More...
 
HAL_StatusTypeDef HAL_DMA2D_ConfigCLUT (DMA2D_HandleTypeDef *hdma2d, DMA2D_CLUTCfgTypeDef CLUTCfg, uint32_t LayerIdx)
 Configure the DMA2D CLUT Transfer. More...
 
HAL_StatusTypeDef HAL_DMA2D_ProgramLineEvent (DMA2D_HandleTypeDef *hdma2d, uint32_t Line)
 Configure the line watermark. More...
 
HAL_StatusTypeDef HAL_DMA2D_EnableDeadTime (DMA2D_HandleTypeDef *hdma2d)
 Enable DMA2D dead time feature. More...
 
HAL_StatusTypeDef HAL_DMA2D_DisableDeadTime (DMA2D_HandleTypeDef *hdma2d)
 Disable DMA2D dead time feature. More...
 
HAL_StatusTypeDef HAL_DMA2D_ConfigDeadTime (DMA2D_HandleTypeDef *hdma2d, uint8_t DeadTime)
 Configure dead time. More...
 
HAL_DMA2D_StateTypeDef HAL_DMA2D_GetState (DMA2D_HandleTypeDef *hdma2d)
 Return the DMA2D state. More...
 
uint32_t HAL_DMA2D_GetError (DMA2D_HandleTypeDef *hdma2d)
 Return the DMA2D error code. More...
 

Variables

 C
 

Detailed Description

Header file of DMA2D HAL module.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32l4xx_hal_dma2d.h.


Data Structure Documentation

◆ DMA2D_CLUTCfgTypeDef

struct DMA2D_CLUTCfgTypeDef

DMA2D CLUT Structure definition.

Definition at line 65 of file stm32l4xx_hal_dma2d.h.

Data Fields
uint32_t CLUTColorMode

Configures the DMA2D CLUT color mode. This parameter can be one value of DMA2D CLUT Color Mode.

uint32_t * pCLUT

Configures the DMA2D CLUT memory address.

uint32_t Size

Configures the DMA2D CLUT size. This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF.

◆ DMA2D_InitTypeDef

struct DMA2D_InitTypeDef

DMA2D Init structure definition.

Definition at line 79 of file stm32l4xx_hal_dma2d.h.

Data Fields
uint32_t AlphaInverted

Select regular or inverted alpha value for the output pixel format converter. This parameter can be one value of DMA2D Alpha Inversion.

uint32_t BytesSwap

Select byte regular mode or bytes swap mode (two by two). This parameter can be one value of DMA2D Bytes Swap.

uint32_t ColorMode

Configures the color format of the output image. This parameter can be one value of DMA2D Output Color Mode.

uint32_t LineOffsetMode

Configures how is expressed the line offset for the foreground, background and output. This parameter can be one value of DMA2D Line Offset Mode.

uint32_t Mode

Configures the DMA2D transfer mode. This parameter can be one value of DMA2D Mode.

uint32_t OutputOffset

Specifies the Offset value. This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0x3FFF.

uint32_t RedBlueSwap

Select regular mode (RGB or ARGB) or swap mode (BGR or ABGR) for the output pixel format converter. This parameter can be one value of DMA2D Red and Blue Swap.

◆ DMA2D_LayerCfgTypeDef

struct DMA2D_LayerCfgTypeDef

DMA2D Layer structure definition.

Definition at line 113 of file stm32l4xx_hal_dma2d.h.

Data Fields
uint32_t AlphaInverted

Select regular or inverted alpha value. This parameter can be one value of DMA2D Alpha Inversion.

uint32_t AlphaMode

Configures the DMA2D foreground or background alpha mode. This parameter can be one value of DMA2D Alpha Mode.

uint32_t InputAlpha

Specifies the DMA2D foreground or background alpha value and color value in case of A8 or A4 color mode. This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF except for the color modes detailed below.

Note
In case of A8 or A4 color mode (ARGB), this parameter must be a number between Min_Data = 0x00000000 and Max_Data = 0xFFFFFFFF where
  • InputAlpha[24:31] is the alpha value ALPHA[0:7]
  • InputAlpha[16:23] is the red value RED[0:7]
  • InputAlpha[8:15] is the green value GREEN[0:7]
  • InputAlpha[0:7] is the blue value BLUE[0:7].
uint32_t InputColorMode

Configures the DMA2D foreground or background color mode. This parameter can be one value of DMA2D Input Color Mode.

uint32_t InputOffset

Configures the DMA2D foreground or background offset. This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0x3FFF.

uint32_t RedBlueSwap

Select regular mode (RGB or ARGB) or swap mode (BGR or ABGR). This parameter can be one value of DMA2D Red and Blue Swap.

Typedef Documentation

◆ DMA2D_HandleTypeDef

DMA2D handle Structure definition.

◆ pDMA2D_CallbackTypeDef

typedef void(* pDMA2D_CallbackTypeDef) (DMA2D_HandleTypeDef *hdma2d)

HAL DMA2D Callback pointer definition.

Pointer to a DMA2D common callback function

Definition at line 191 of file stm32l4xx_hal_dma2d.h.

Enumeration Type Documentation

◆ HAL_DMA2D_StateTypeDef

HAL DMA2D State structures definition.

Enumerator
HAL_DMA2D_STATE_RESET 

DMA2D not yet initialized or disabled

HAL_DMA2D_STATE_READY 

Peripheral Initialized and ready for use

HAL_DMA2D_STATE_BUSY 

An internal process is ongoing

HAL_DMA2D_STATE_TIMEOUT 

Timeout state

HAL_DMA2D_STATE_ERROR 

DMA2D state error

HAL_DMA2D_STATE_SUSPEND 

DMA2D process is suspended

Definition at line 144 of file stm32l4xx_hal_dma2d.h.

Variable Documentation

◆ C

C
Initial value:
{
#endif
#if defined (DMA2D)
#define MAX_DMA2D_LAYER 2U
typedef struct
{
uint32_t Blue;
uint32_t Green;
uint32_t Red;
} DMA2D_ColorTypeDef
This file contains HAL common defines, enumeration, macros and structures definitions.

DMA2D maximum number of layers