Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
Kojto
Date:
Tue Mar 15 14:34:00 2016 +0000
Revision:
116:c0f6e94411f5
Parent:
107:4f6c30876dfa
Release 116 of the mbed library

Changes:
- new targets - NUCLEO_L073RZ
- fixes to IOTSS BEID platform
- LPC824, LPC1549 and LPC11U68 - fix PWMOut SCT bugs
- STM32F7 - Cube driver
- STM32F4 - add RTC LSI macro, defined as 0
- STM32F3 - fix multiple ADC clock initialization
- retarget - binary mode fix for GCC

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 107:4f6c30876dfa 1 /**
Kojto 107:4f6c30876dfa 2 ******************************************************************************
Kojto 107:4f6c30876dfa 3 * @file stm32f7xx_hal_dma2d.h
Kojto 107:4f6c30876dfa 4 * @author MCD Application Team
Kojto 116:c0f6e94411f5 5 * @version V1.0.4
Kojto 116:c0f6e94411f5 6 * @date 09-December-2015
Kojto 107:4f6c30876dfa 7 * @brief Header file of DMA2D HAL module.
Kojto 107:4f6c30876dfa 8 ******************************************************************************
Kojto 107:4f6c30876dfa 9 * @attention
Kojto 107:4f6c30876dfa 10 *
Kojto 107:4f6c30876dfa 11 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
Kojto 107:4f6c30876dfa 12 *
Kojto 107:4f6c30876dfa 13 * Redistribution and use in source and binary forms, with or without modification,
Kojto 107:4f6c30876dfa 14 * are permitted provided that the following conditions are met:
Kojto 107:4f6c30876dfa 15 * 1. Redistributions of source code must retain the above copyright notice,
Kojto 107:4f6c30876dfa 16 * this list of conditions and the following disclaimer.
Kojto 107:4f6c30876dfa 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Kojto 107:4f6c30876dfa 18 * this list of conditions and the following disclaimer in the documentation
Kojto 107:4f6c30876dfa 19 * and/or other materials provided with the distribution.
Kojto 107:4f6c30876dfa 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Kojto 107:4f6c30876dfa 21 * may be used to endorse or promote products derived from this software
Kojto 107:4f6c30876dfa 22 * without specific prior written permission.
Kojto 107:4f6c30876dfa 23 *
Kojto 107:4f6c30876dfa 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Kojto 107:4f6c30876dfa 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Kojto 107:4f6c30876dfa 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Kojto 107:4f6c30876dfa 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Kojto 107:4f6c30876dfa 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Kojto 107:4f6c30876dfa 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Kojto 107:4f6c30876dfa 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Kojto 107:4f6c30876dfa 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Kojto 107:4f6c30876dfa 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Kojto 107:4f6c30876dfa 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Kojto 107:4f6c30876dfa 34 *
Kojto 107:4f6c30876dfa 35 ******************************************************************************
Kojto 107:4f6c30876dfa 36 */
Kojto 107:4f6c30876dfa 37
Kojto 107:4f6c30876dfa 38 /* Define to prevent recursive inclusion -------------------------------------*/
Kojto 107:4f6c30876dfa 39 #ifndef __STM32F7xx_HAL_DMA2D_H
Kojto 107:4f6c30876dfa 40 #define __STM32F7xx_HAL_DMA2D_H
Kojto 107:4f6c30876dfa 41
Kojto 107:4f6c30876dfa 42 #ifdef __cplusplus
Kojto 107:4f6c30876dfa 43 extern "C" {
Kojto 107:4f6c30876dfa 44 #endif
Kojto 107:4f6c30876dfa 45
Kojto 107:4f6c30876dfa 46 /* Includes ------------------------------------------------------------------*/
Kojto 107:4f6c30876dfa 47 #include "stm32f7xx_hal_def.h"
Kojto 107:4f6c30876dfa 48
Kojto 107:4f6c30876dfa 49 /** @addtogroup STM32F7xx_HAL_Driver
Kojto 107:4f6c30876dfa 50 * @{
Kojto 107:4f6c30876dfa 51 */
Kojto 107:4f6c30876dfa 52
Kojto 107:4f6c30876dfa 53 /** @defgroup DMA2D DMA2D
Kojto 107:4f6c30876dfa 54 * @brief DMA2D HAL module driver
Kojto 107:4f6c30876dfa 55 * @{
Kojto 107:4f6c30876dfa 56 */
Kojto 107:4f6c30876dfa 57
Kojto 107:4f6c30876dfa 58 /* Exported types ------------------------------------------------------------*/
Kojto 107:4f6c30876dfa 59 /** @defgroup DMA2D_Exported_Types DMA2D Exported Types
Kojto 107:4f6c30876dfa 60 * @{
Kojto 107:4f6c30876dfa 61 */
Kojto 107:4f6c30876dfa 62 #define MAX_DMA2D_LAYER 2
Kojto 107:4f6c30876dfa 63
Kojto 107:4f6c30876dfa 64 /**
Kojto 107:4f6c30876dfa 65 * @brief DMA2D color Structure definition
Kojto 107:4f6c30876dfa 66 */
Kojto 107:4f6c30876dfa 67 typedef struct
Kojto 107:4f6c30876dfa 68 {
Kojto 107:4f6c30876dfa 69 uint32_t Blue; /*!< Configures the blue value.
Kojto 107:4f6c30876dfa 70 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */
Kojto 107:4f6c30876dfa 71
Kojto 107:4f6c30876dfa 72 uint32_t Green; /*!< Configures the green value.
Kojto 107:4f6c30876dfa 73 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */
Kojto 107:4f6c30876dfa 74
Kojto 107:4f6c30876dfa 75 uint32_t Red; /*!< Configures the red value.
Kojto 107:4f6c30876dfa 76 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */
Kojto 107:4f6c30876dfa 77 } DMA2D_ColorTypeDef;
Kojto 107:4f6c30876dfa 78
Kojto 107:4f6c30876dfa 79 /**
Kojto 107:4f6c30876dfa 80 * @brief DMA2D CLUT Structure definition
Kojto 107:4f6c30876dfa 81 */
Kojto 107:4f6c30876dfa 82 typedef struct
Kojto 107:4f6c30876dfa 83 {
Kojto 107:4f6c30876dfa 84 uint32_t *pCLUT; /*!< Configures the DMA2D CLUT memory address.*/
Kojto 107:4f6c30876dfa 85
Kojto 107:4f6c30876dfa 86 uint32_t CLUTColorMode; /*!< configures the DMA2D CLUT color mode.
Kojto 107:4f6c30876dfa 87 This parameter can be one value of @ref DMA2D_CLUT_CM */
Kojto 107:4f6c30876dfa 88
Kojto 107:4f6c30876dfa 89 uint32_t Size; /*!< configures the DMA2D CLUT size.
Kojto 107:4f6c30876dfa 90 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF.*/
Kojto 107:4f6c30876dfa 91 } DMA2D_CLUTCfgTypeDef;
Kojto 107:4f6c30876dfa 92
Kojto 107:4f6c30876dfa 93 /**
Kojto 107:4f6c30876dfa 94 * @brief DMA2D Init structure definition
Kojto 107:4f6c30876dfa 95 */
Kojto 107:4f6c30876dfa 96 typedef struct
Kojto 107:4f6c30876dfa 97 {
Kojto 107:4f6c30876dfa 98 uint32_t Mode; /*!< configures the DMA2D transfer mode.
Kojto 107:4f6c30876dfa 99 This parameter can be one value of @ref DMA2D_Mode */
Kojto 107:4f6c30876dfa 100
Kojto 107:4f6c30876dfa 101 uint32_t ColorMode; /*!< configures the color format of the output image.
Kojto 107:4f6c30876dfa 102 This parameter can be one value of @ref DMA2D_Color_Mode */
Kojto 107:4f6c30876dfa 103
Kojto 107:4f6c30876dfa 104 uint32_t OutputOffset; /*!< Specifies the Offset value.
Kojto 107:4f6c30876dfa 105 This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0x3FFF. */
Kojto 107:4f6c30876dfa 106 } DMA2D_InitTypeDef;
Kojto 107:4f6c30876dfa 107
Kojto 107:4f6c30876dfa 108 /**
Kojto 107:4f6c30876dfa 109 * @brief DMA2D Layer structure definition
Kojto 107:4f6c30876dfa 110 */
Kojto 107:4f6c30876dfa 111 typedef struct
Kojto 107:4f6c30876dfa 112 {
Kojto 107:4f6c30876dfa 113 uint32_t InputOffset; /*!< configures the DMA2D foreground offset.
Kojto 107:4f6c30876dfa 114 This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0x3FFF. */
Kojto 107:4f6c30876dfa 115
Kojto 107:4f6c30876dfa 116 uint32_t InputColorMode; /*!< configures the DMA2D foreground color mode .
Kojto 107:4f6c30876dfa 117 This parameter can be one value of @ref DMA2D_Input_Color_Mode */
Kojto 107:4f6c30876dfa 118
Kojto 107:4f6c30876dfa 119 uint32_t AlphaMode; /*!< configures the DMA2D foreground alpha mode.
Kojto 107:4f6c30876dfa 120 This parameter can be one value of @ref DMA2D_ALPHA_MODE */
Kojto 107:4f6c30876dfa 121
Kojto 107:4f6c30876dfa 122 uint32_t InputAlpha; /*!< Specifies the DMA2D foreground alpha value and color value in case of A8 or A4 color mode.
Kojto 107:4f6c30876dfa 123 This parameter must be a number between Min_Data = 0x00000000 and Max_Data = 0xFFFFFFFF
Kojto 107:4f6c30876dfa 124 in case of A8 or A4 color mode (ARGB).
Kojto 107:4f6c30876dfa 125 Otherwise, This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF.*/
Kojto 107:4f6c30876dfa 126
Kojto 107:4f6c30876dfa 127 } DMA2D_LayerCfgTypeDef;
Kojto 107:4f6c30876dfa 128
Kojto 107:4f6c30876dfa 129 /**
Kojto 107:4f6c30876dfa 130 * @brief HAL DMA2D State structures definition
Kojto 107:4f6c30876dfa 131 */
Kojto 107:4f6c30876dfa 132 typedef enum
Kojto 107:4f6c30876dfa 133 {
Kojto 107:4f6c30876dfa 134 HAL_DMA2D_STATE_RESET = 0x00, /*!< DMA2D not yet initialized or disabled */
Kojto 107:4f6c30876dfa 135 HAL_DMA2D_STATE_READY = 0x01, /*!< Peripheral Initialized and ready for use */
Kojto 107:4f6c30876dfa 136 HAL_DMA2D_STATE_BUSY = 0x02, /*!< an internal process is ongoing */
Kojto 107:4f6c30876dfa 137 HAL_DMA2D_STATE_TIMEOUT = 0x03, /*!< Timeout state */
Kojto 107:4f6c30876dfa 138 HAL_DMA2D_STATE_ERROR = 0x04, /*!< DMA2D state error */
Kojto 107:4f6c30876dfa 139 HAL_DMA2D_STATE_SUSPEND = 0x05 /*!< DMA2D process is suspended */
Kojto 107:4f6c30876dfa 140 }HAL_DMA2D_StateTypeDef;
Kojto 107:4f6c30876dfa 141
Kojto 107:4f6c30876dfa 142 /**
Kojto 107:4f6c30876dfa 143 * @brief DMA2D handle Structure definition
Kojto 107:4f6c30876dfa 144 */
Kojto 107:4f6c30876dfa 145 typedef struct __DMA2D_HandleTypeDef
Kojto 107:4f6c30876dfa 146 {
Kojto 107:4f6c30876dfa 147 DMA2D_TypeDef *Instance; /*!< DMA2D Register base address */
Kojto 107:4f6c30876dfa 148
Kojto 107:4f6c30876dfa 149 DMA2D_InitTypeDef Init; /*!< DMA2D communication parameters */
Kojto 107:4f6c30876dfa 150
Kojto 107:4f6c30876dfa 151 void (* XferCpltCallback)(struct __DMA2D_HandleTypeDef * hdma2d); /*!< DMA2D transfer complete callback */
Kojto 107:4f6c30876dfa 152
Kojto 107:4f6c30876dfa 153 void (* XferErrorCallback)(struct __DMA2D_HandleTypeDef * hdma2d); /*!< DMA2D transfer error callback */
Kojto 107:4f6c30876dfa 154
Kojto 107:4f6c30876dfa 155 DMA2D_LayerCfgTypeDef LayerCfg[MAX_DMA2D_LAYER]; /*!< DMA2D Layers parameters */
Kojto 107:4f6c30876dfa 156
Kojto 107:4f6c30876dfa 157 HAL_LockTypeDef Lock; /*!< DMA2D Lock */
Kojto 107:4f6c30876dfa 158
Kojto 107:4f6c30876dfa 159 __IO HAL_DMA2D_StateTypeDef State; /*!< DMA2D transfer state */
Kojto 107:4f6c30876dfa 160
Kojto 107:4f6c30876dfa 161 __IO uint32_t ErrorCode; /*!< DMA2D Error code */
Kojto 107:4f6c30876dfa 162 } DMA2D_HandleTypeDef;
Kojto 107:4f6c30876dfa 163 /**
Kojto 107:4f6c30876dfa 164 * @}
Kojto 107:4f6c30876dfa 165 */
Kojto 107:4f6c30876dfa 166
Kojto 107:4f6c30876dfa 167 /* Exported constants --------------------------------------------------------*/
Kojto 107:4f6c30876dfa 168 /** @defgroup DMA2D_Exported_Constants DMA2D Exported Constants
Kojto 107:4f6c30876dfa 169 * @{
Kojto 107:4f6c30876dfa 170 */
Kojto 107:4f6c30876dfa 171
Kojto 107:4f6c30876dfa 172 /** @defgroup DMA2D_Error_Code DMA2D Error Code
Kojto 107:4f6c30876dfa 173 * @{
Kojto 107:4f6c30876dfa 174 */
Kojto 107:4f6c30876dfa 175 #define HAL_DMA2D_ERROR_NONE ((uint32_t)0x00000000) /*!< No error */
Kojto 107:4f6c30876dfa 176 #define HAL_DMA2D_ERROR_TE ((uint32_t)0x00000001) /*!< Transfer error */
Kojto 107:4f6c30876dfa 177 #define HAL_DMA2D_ERROR_CE ((uint32_t)0x00000002) /*!< Configuration error */
Kojto 107:4f6c30876dfa 178 #define HAL_DMA2D_ERROR_TIMEOUT ((uint32_t)0x00000020) /*!< Timeout error */
Kojto 107:4f6c30876dfa 179 /**
Kojto 107:4f6c30876dfa 180 * @}
Kojto 107:4f6c30876dfa 181 */
Kojto 107:4f6c30876dfa 182
Kojto 107:4f6c30876dfa 183 /** @defgroup DMA2D_Mode DMA2D Mode
Kojto 107:4f6c30876dfa 184 * @{
Kojto 107:4f6c30876dfa 185 */
Kojto 107:4f6c30876dfa 186 #define DMA2D_M2M ((uint32_t)0x00000000) /*!< DMA2D memory to memory transfer mode */
Kojto 107:4f6c30876dfa 187 #define DMA2D_M2M_PFC ((uint32_t)0x00010000) /*!< DMA2D memory to memory with pixel format conversion transfer mode */
Kojto 107:4f6c30876dfa 188 #define DMA2D_M2M_BLEND ((uint32_t)0x00020000) /*!< DMA2D memory to memory with blending transfer mode */
Kojto 107:4f6c30876dfa 189 #define DMA2D_R2M ((uint32_t)0x00030000) /*!< DMA2D register to memory transfer mode */
Kojto 107:4f6c30876dfa 190 /**
Kojto 107:4f6c30876dfa 191 * @}
Kojto 107:4f6c30876dfa 192 */
Kojto 107:4f6c30876dfa 193
Kojto 107:4f6c30876dfa 194 /** @defgroup DMA2D_Color_Mode DMA2D Color Mode
Kojto 107:4f6c30876dfa 195 * @{
Kojto 107:4f6c30876dfa 196 */
Kojto 107:4f6c30876dfa 197 #define DMA2D_ARGB8888 ((uint32_t)0x00000000) /*!< ARGB8888 DMA2D color mode */
Kojto 107:4f6c30876dfa 198 #define DMA2D_RGB888 ((uint32_t)0x00000001) /*!< RGB888 DMA2D color mode */
Kojto 107:4f6c30876dfa 199 #define DMA2D_RGB565 ((uint32_t)0x00000002) /*!< RGB565 DMA2D color mode */
Kojto 107:4f6c30876dfa 200 #define DMA2D_ARGB1555 ((uint32_t)0x00000003) /*!< ARGB1555 DMA2D color mode */
Kojto 107:4f6c30876dfa 201 #define DMA2D_ARGB4444 ((uint32_t)0x00000004) /*!< ARGB4444 DMA2D color mode */
Kojto 107:4f6c30876dfa 202 /**
Kojto 107:4f6c30876dfa 203 * @}
Kojto 107:4f6c30876dfa 204 */
Kojto 107:4f6c30876dfa 205
Kojto 107:4f6c30876dfa 206 /** @defgroup DMA2D_COLOR_VALUE DMA2D COLOR VALUE
Kojto 107:4f6c30876dfa 207 * @{
Kojto 107:4f6c30876dfa 208 */
Kojto 107:4f6c30876dfa 209 #define COLOR_VALUE ((uint32_t)0x000000FF) /*!< color value mask */
Kojto 107:4f6c30876dfa 210 /**
Kojto 107:4f6c30876dfa 211 * @}
Kojto 107:4f6c30876dfa 212 */
Kojto 107:4f6c30876dfa 213
Kojto 107:4f6c30876dfa 214 /** @defgroup DMA2D_SIZE DMA2D SIZE
Kojto 107:4f6c30876dfa 215 * @{
Kojto 107:4f6c30876dfa 216 */
Kojto 107:4f6c30876dfa 217 #define DMA2D_PIXEL (DMA2D_NLR_PL >> 16) /*!< DMA2D pixel per line */
Kojto 107:4f6c30876dfa 218 #define DMA2D_LINE DMA2D_NLR_NL /*!< DMA2D number of line */
Kojto 107:4f6c30876dfa 219 /**
Kojto 107:4f6c30876dfa 220 * @}
Kojto 107:4f6c30876dfa 221 */
Kojto 107:4f6c30876dfa 222
Kojto 107:4f6c30876dfa 223 /** @defgroup DMA2D_Offset DMA2D Offset
Kojto 107:4f6c30876dfa 224 * @{
Kojto 107:4f6c30876dfa 225 */
Kojto 107:4f6c30876dfa 226 #define DMA2D_OFFSET DMA2D_FGOR_LO /*!< Line Offset */
Kojto 107:4f6c30876dfa 227 /**
Kojto 107:4f6c30876dfa 228 * @}
Kojto 107:4f6c30876dfa 229 */
Kojto 107:4f6c30876dfa 230
Kojto 107:4f6c30876dfa 231 /** @defgroup DMA2D_Input_Color_Mode DMA2D Input Color Mode
Kojto 107:4f6c30876dfa 232 * @{
Kojto 107:4f6c30876dfa 233 */
Kojto 107:4f6c30876dfa 234 #define CM_ARGB8888 ((uint32_t)0x00000000) /*!< ARGB8888 color mode */
Kojto 107:4f6c30876dfa 235 #define CM_RGB888 ((uint32_t)0x00000001) /*!< RGB888 color mode */
Kojto 107:4f6c30876dfa 236 #define CM_RGB565 ((uint32_t)0x00000002) /*!< RGB565 color mode */
Kojto 107:4f6c30876dfa 237 #define CM_ARGB1555 ((uint32_t)0x00000003) /*!< ARGB1555 color mode */
Kojto 107:4f6c30876dfa 238 #define CM_ARGB4444 ((uint32_t)0x00000004) /*!< ARGB4444 color mode */
Kojto 107:4f6c30876dfa 239 #define CM_L8 ((uint32_t)0x00000005) /*!< L8 color mode */
Kojto 107:4f6c30876dfa 240 #define CM_AL44 ((uint32_t)0x00000006) /*!< AL44 color mode */
Kojto 107:4f6c30876dfa 241 #define CM_AL88 ((uint32_t)0x00000007) /*!< AL88 color mode */
Kojto 107:4f6c30876dfa 242 #define CM_L4 ((uint32_t)0x00000008) /*!< L4 color mode */
Kojto 107:4f6c30876dfa 243 #define CM_A8 ((uint32_t)0x00000009) /*!< A8 color mode */
Kojto 107:4f6c30876dfa 244 #define CM_A4 ((uint32_t)0x0000000A) /*!< A4 color mode */
Kojto 107:4f6c30876dfa 245 /**
Kojto 107:4f6c30876dfa 246 * @}
Kojto 107:4f6c30876dfa 247 */
Kojto 107:4f6c30876dfa 248
Kojto 107:4f6c30876dfa 249 /** @defgroup DMA2D_ALPHA_MODE DMA2D ALPHA MODE
Kojto 107:4f6c30876dfa 250 * @{
Kojto 107:4f6c30876dfa 251 */
Kojto 107:4f6c30876dfa 252 #define DMA2D_NO_MODIF_ALPHA ((uint32_t)0x00000000) /*!< No modification of the alpha channel value */
Kojto 107:4f6c30876dfa 253 #define DMA2D_REPLACE_ALPHA ((uint32_t)0x00000001) /*!< Replace original alpha channel value by programmed alpha value */
Kojto 107:4f6c30876dfa 254 #define DMA2D_COMBINE_ALPHA ((uint32_t)0x00000002) /*!< Replace original alpha channel value by programmed alpha value
Kojto 107:4f6c30876dfa 255 with original alpha channel value */
Kojto 107:4f6c30876dfa 256 /**
Kojto 107:4f6c30876dfa 257 * @}
Kojto 107:4f6c30876dfa 258 */
Kojto 107:4f6c30876dfa 259
Kojto 107:4f6c30876dfa 260 /** @defgroup DMA2D_CLUT_CM DMA2D CLUT CM
Kojto 107:4f6c30876dfa 261 * @{
Kojto 107:4f6c30876dfa 262 */
Kojto 107:4f6c30876dfa 263 #define DMA2D_CCM_ARGB8888 ((uint32_t)0x00000000) /*!< ARGB8888 DMA2D C-LUT color mode */
Kojto 107:4f6c30876dfa 264 #define DMA2D_CCM_RGB888 ((uint32_t)0x00000001) /*!< RGB888 DMA2D C-LUT color mode */
Kojto 107:4f6c30876dfa 265 /**
Kojto 107:4f6c30876dfa 266 * @}
Kojto 107:4f6c30876dfa 267 */
Kojto 107:4f6c30876dfa 268
Kojto 107:4f6c30876dfa 269 /** @defgroup DMA2D_Size_Clut DMA2D Size Clut
Kojto 107:4f6c30876dfa 270 * @{
Kojto 107:4f6c30876dfa 271 */
Kojto 107:4f6c30876dfa 272 #define DMA2D_CLUT_SIZE (DMA2D_FGPFCCR_CS >> 8) /*!< DMA2D C-LUT size */
Kojto 107:4f6c30876dfa 273 /**
Kojto 107:4f6c30876dfa 274 * @}
Kojto 107:4f6c30876dfa 275 */
Kojto 107:4f6c30876dfa 276
Kojto 107:4f6c30876dfa 277 /** @defgroup DMA2D_DeadTime DMA2D DeadTime
Kojto 107:4f6c30876dfa 278 * @{
Kojto 107:4f6c30876dfa 279 */
Kojto 107:4f6c30876dfa 280 #define LINE_WATERMARK DMA2D_LWR_LW
Kojto 107:4f6c30876dfa 281 /**
Kojto 107:4f6c30876dfa 282 * @}
Kojto 107:4f6c30876dfa 283 */
Kojto 107:4f6c30876dfa 284
Kojto 107:4f6c30876dfa 285 /** @defgroup DMA2D_Interrupts DMA2D Interrupts
Kojto 107:4f6c30876dfa 286 * @{
Kojto 107:4f6c30876dfa 287 */
Kojto 107:4f6c30876dfa 288 #define DMA2D_IT_CE DMA2D_CR_CEIE /*!< Configuration Error Interrupt */
Kojto 107:4f6c30876dfa 289 #define DMA2D_IT_CTC DMA2D_CR_CTCIE /*!< C-LUT Transfer Complete Interrupt */
Kojto 107:4f6c30876dfa 290 #define DMA2D_IT_CAE DMA2D_CR_CAEIE /*!< C-LUT Access Error Interrupt */
Kojto 107:4f6c30876dfa 291 #define DMA2D_IT_TW DMA2D_CR_TWIE /*!< Transfer Watermark Interrupt */
Kojto 107:4f6c30876dfa 292 #define DMA2D_IT_TC DMA2D_CR_TCIE /*!< Transfer Complete Interrupt */
Kojto 107:4f6c30876dfa 293 #define DMA2D_IT_TE DMA2D_CR_TEIE /*!< Transfer Error Interrupt */
Kojto 107:4f6c30876dfa 294 /**
Kojto 107:4f6c30876dfa 295 * @}
Kojto 107:4f6c30876dfa 296 */
Kojto 107:4f6c30876dfa 297
Kojto 107:4f6c30876dfa 298 /** @defgroup DMA2D_Flag DMA2D Flag
Kojto 107:4f6c30876dfa 299 * @{
Kojto 107:4f6c30876dfa 300 */
Kojto 107:4f6c30876dfa 301 #define DMA2D_FLAG_CE DMA2D_ISR_CEIF /*!< Configuration Error Interrupt Flag */
Kojto 107:4f6c30876dfa 302 #define DMA2D_FLAG_CTC DMA2D_ISR_CTCIF /*!< C-LUT Transfer Complete Interrupt Flag */
Kojto 107:4f6c30876dfa 303 #define DMA2D_FLAG_CAE DMA2D_ISR_CAEIF /*!< C-LUT Access Error Interrupt Flag */
Kojto 107:4f6c30876dfa 304 #define DMA2D_FLAG_TW DMA2D_ISR_TWIF /*!< Transfer Watermark Interrupt Flag */
Kojto 107:4f6c30876dfa 305 #define DMA2D_FLAG_TC DMA2D_ISR_TCIF /*!< Transfer Complete Interrupt Flag */
Kojto 107:4f6c30876dfa 306 #define DMA2D_FLAG_TE DMA2D_ISR_TEIF /*!< Transfer Error Interrupt Flag */
Kojto 107:4f6c30876dfa 307 /**
Kojto 107:4f6c30876dfa 308 * @}
Kojto 107:4f6c30876dfa 309 */
Kojto 107:4f6c30876dfa 310
Kojto 107:4f6c30876dfa 311 /**
Kojto 107:4f6c30876dfa 312 * @}
Kojto 107:4f6c30876dfa 313 */
Kojto 107:4f6c30876dfa 314 /* Exported macro ------------------------------------------------------------*/
Kojto 107:4f6c30876dfa 315 /** @defgroup DMA2D_Exported_Macros DMA2D Exported Macros
Kojto 107:4f6c30876dfa 316 * @{
Kojto 107:4f6c30876dfa 317 */
Kojto 107:4f6c30876dfa 318
Kojto 107:4f6c30876dfa 319 /** @brief Reset DMA2D handle state
Kojto 107:4f6c30876dfa 320 * @param __HANDLE__: specifies the DMA2D handle.
Kojto 107:4f6c30876dfa 321 * @retval None
Kojto 107:4f6c30876dfa 322 */
Kojto 107:4f6c30876dfa 323 #define __HAL_DMA2D_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DMA2D_STATE_RESET)
Kojto 107:4f6c30876dfa 324
Kojto 107:4f6c30876dfa 325 /**
Kojto 107:4f6c30876dfa 326 * @brief Enable the DMA2D.
Kojto 107:4f6c30876dfa 327 * @param __HANDLE__: DMA2D handle
Kojto 107:4f6c30876dfa 328 * @retval None.
Kojto 107:4f6c30876dfa 329 */
Kojto 107:4f6c30876dfa 330 #define __HAL_DMA2D_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= DMA2D_CR_START)
Kojto 107:4f6c30876dfa 331
Kojto 107:4f6c30876dfa 332 /**
Kojto 107:4f6c30876dfa 333 * @brief Disable the DMA2D.
Kojto 107:4f6c30876dfa 334 * @param __HANDLE__: DMA2D handle
Kojto 107:4f6c30876dfa 335 * @retval None.
Kojto 107:4f6c30876dfa 336 */
Kojto 107:4f6c30876dfa 337 #define __HAL_DMA2D_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~DMA2D_CR_START)
Kojto 107:4f6c30876dfa 338
Kojto 107:4f6c30876dfa 339 /* Interrupt & Flag management */
Kojto 107:4f6c30876dfa 340 /**
Kojto 107:4f6c30876dfa 341 * @brief Get the DMA2D pending flags.
Kojto 107:4f6c30876dfa 342 * @param __HANDLE__: DMA2D handle
Kojto 107:4f6c30876dfa 343 * @param __FLAG__: Get the specified flag.
Kojto 107:4f6c30876dfa 344 * This parameter can be any combination of the following values:
Kojto 107:4f6c30876dfa 345 * @arg DMA2D_FLAG_CE: Configuration error flag
Kojto 107:4f6c30876dfa 346 * @arg DMA2D_FLAG_CTC: C-LUT transfer complete flag
Kojto 107:4f6c30876dfa 347 * @arg DMA2D_FLAG_CAE: C-LUT access error flag
Kojto 107:4f6c30876dfa 348 * @arg DMA2D_FLAG_TW: Transfer Watermark flag
Kojto 107:4f6c30876dfa 349 * @arg DMA2D_FLAG_TC: Transfer complete flag
Kojto 107:4f6c30876dfa 350 * @arg DMA2D_FLAG_TE: Transfer error flag
Kojto 107:4f6c30876dfa 351 * @retval The state of FLAG.
Kojto 107:4f6c30876dfa 352 */
Kojto 107:4f6c30876dfa 353 #define __HAL_DMA2D_GET_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR & (__FLAG__))
Kojto 107:4f6c30876dfa 354
Kojto 107:4f6c30876dfa 355 /**
Kojto 107:4f6c30876dfa 356 * @brief Clears the DMA2D pending flags.
Kojto 107:4f6c30876dfa 357 * @param __HANDLE__: DMA2D handle
Kojto 107:4f6c30876dfa 358 * @param __FLAG__: specifies the flag to clear.
Kojto 107:4f6c30876dfa 359 * This parameter can be any combination of the following values:
Kojto 107:4f6c30876dfa 360 * @arg DMA2D_FLAG_CE: Configuration error flag
Kojto 107:4f6c30876dfa 361 * @arg DMA2D_FLAG_CTC: C-LUT transfer complete flag
Kojto 107:4f6c30876dfa 362 * @arg DMA2D_FLAG_CAE: C-LUT access error flag
Kojto 107:4f6c30876dfa 363 * @arg DMA2D_FLAG_TW: Transfer Watermark flag
Kojto 107:4f6c30876dfa 364 * @arg DMA2D_FLAG_TC: Transfer complete flag
Kojto 107:4f6c30876dfa 365 * @arg DMA2D_FLAG_TE: Transfer error flag
Kojto 107:4f6c30876dfa 366 * @retval None
Kojto 107:4f6c30876dfa 367 */
Kojto 107:4f6c30876dfa 368 #define __HAL_DMA2D_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->IFCR = (__FLAG__))
Kojto 107:4f6c30876dfa 369
Kojto 107:4f6c30876dfa 370 /**
Kojto 107:4f6c30876dfa 371 * @brief Enables the specified DMA2D interrupts.
Kojto 107:4f6c30876dfa 372 * @param __HANDLE__: DMA2D handle
Kojto 107:4f6c30876dfa 373 * @param __INTERRUPT__: specifies the DMA2D interrupt sources to be enabled.
Kojto 107:4f6c30876dfa 374 * This parameter can be any combination of the following values:
Kojto 107:4f6c30876dfa 375 * @arg DMA2D_IT_CE: Configuration error interrupt mask
Kojto 107:4f6c30876dfa 376 * @arg DMA2D_IT_CTC: C-LUT transfer complete interrupt mask
Kojto 107:4f6c30876dfa 377 * @arg DMA2D_IT_CAE: C-LUT access error interrupt mask
Kojto 107:4f6c30876dfa 378 * @arg DMA2D_IT_TW: Transfer Watermark interrupt mask
Kojto 107:4f6c30876dfa 379 * @arg DMA2D_IT_TC: Transfer complete interrupt mask
Kojto 107:4f6c30876dfa 380 * @arg DMA2D_IT_TE: Transfer error interrupt mask
Kojto 107:4f6c30876dfa 381 * @retval None
Kojto 107:4f6c30876dfa 382 */
Kojto 107:4f6c30876dfa 383 #define __HAL_DMA2D_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR |= (__INTERRUPT__))
Kojto 107:4f6c30876dfa 384
Kojto 107:4f6c30876dfa 385 /**
Kojto 107:4f6c30876dfa 386 * @brief Disables the specified DMA2D interrupts.
Kojto 107:4f6c30876dfa 387 * @param __HANDLE__: DMA2D handle
Kojto 107:4f6c30876dfa 388 * @param __INTERRUPT__: specifies the DMA2D interrupt sources to be disabled.
Kojto 107:4f6c30876dfa 389 * This parameter can be any combination of the following values:
Kojto 107:4f6c30876dfa 390 * @arg DMA2D_IT_CE: Configuration error interrupt mask
Kojto 107:4f6c30876dfa 391 * @arg DMA2D_IT_CTC: C-LUT transfer complete interrupt mask
Kojto 107:4f6c30876dfa 392 * @arg DMA2D_IT_CAE: C-LUT access error interrupt mask
Kojto 107:4f6c30876dfa 393 * @arg DMA2D_IT_TW: Transfer Watermark interrupt mask
Kojto 107:4f6c30876dfa 394 * @arg DMA2D_IT_TC: Transfer complete interrupt mask
Kojto 107:4f6c30876dfa 395 * @arg DMA2D_IT_TE: Transfer error interrupt mask
Kojto 107:4f6c30876dfa 396 * @retval None
Kojto 107:4f6c30876dfa 397 */
Kojto 107:4f6c30876dfa 398 #define __HAL_DMA2D_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__))
Kojto 107:4f6c30876dfa 399
Kojto 107:4f6c30876dfa 400 /**
Kojto 107:4f6c30876dfa 401 * @brief Checks whether the specified DMA2D interrupt has occurred or not.
Kojto 107:4f6c30876dfa 402 * @param __HANDLE__: DMA2D handle
Kojto 107:4f6c30876dfa 403 * @param __INTERRUPT__: specifies the DMA2D interrupt source to check.
Kojto 107:4f6c30876dfa 404 * This parameter can be one of the following values:
Kojto 107:4f6c30876dfa 405 * @arg DMA2D_IT_CE: Configuration error interrupt mask
Kojto 107:4f6c30876dfa 406 * @arg DMA2D_IT_CTC: C-LUT transfer complete interrupt mask
Kojto 107:4f6c30876dfa 407 * @arg DMA2D_IT_CAE: C-LUT access error interrupt mask
Kojto 107:4f6c30876dfa 408 * @arg DMA2D_IT_TW: Transfer Watermark interrupt mask
Kojto 107:4f6c30876dfa 409 * @arg DMA2D_IT_TC: Transfer complete interrupt mask
Kojto 107:4f6c30876dfa 410 * @arg DMA2D_IT_TE: Transfer error interrupt mask
Kojto 107:4f6c30876dfa 411 * @retval The state of INTERRUPT.
Kojto 107:4f6c30876dfa 412 */
Kojto 107:4f6c30876dfa 413 #define __HAL_DMA2D_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR & (__INTERRUPT__))
Kojto 107:4f6c30876dfa 414 /**
Kojto 107:4f6c30876dfa 415 * @}
Kojto 107:4f6c30876dfa 416 */
Kojto 107:4f6c30876dfa 417
Kojto 107:4f6c30876dfa 418 /* Exported functions --------------------------------------------------------*/
Kojto 107:4f6c30876dfa 419 /** @defgroup DMA2D_Exported_Functions DMA2D Exported Functions
Kojto 107:4f6c30876dfa 420 * @{
Kojto 107:4f6c30876dfa 421 */
Kojto 107:4f6c30876dfa 422 /* Initialization and de-initialization functions *******************************/
Kojto 107:4f6c30876dfa 423 HAL_StatusTypeDef HAL_DMA2D_Init(DMA2D_HandleTypeDef *hdma2d);
Kojto 107:4f6c30876dfa 424 HAL_StatusTypeDef HAL_DMA2D_DeInit (DMA2D_HandleTypeDef *hdma2d);
Kojto 107:4f6c30876dfa 425 void HAL_DMA2D_MspInit(DMA2D_HandleTypeDef* hdma2d);
Kojto 107:4f6c30876dfa 426 void HAL_DMA2D_MspDeInit(DMA2D_HandleTypeDef* hdma2d);
Kojto 107:4f6c30876dfa 427
Kojto 107:4f6c30876dfa 428 /* IO operation functions *******************************************************/
Kojto 107:4f6c30876dfa 429 HAL_StatusTypeDef HAL_DMA2D_Start(DMA2D_HandleTypeDef *hdma2d, uint32_t pdata, uint32_t DstAddress, uint32_t Width, uint32_t Height);
Kojto 107:4f6c30876dfa 430 HAL_StatusTypeDef HAL_DMA2D_BlendingStart(DMA2D_HandleTypeDef *hdma2d, uint32_t SrcAddress1, uint32_t SrcAddress2, uint32_t DstAddress, uint32_t Width, uint32_t Height);
Kojto 107:4f6c30876dfa 431 HAL_StatusTypeDef HAL_DMA2D_Start_IT(DMA2D_HandleTypeDef *hdma2d, uint32_t pdata, uint32_t DstAddress, uint32_t Width, uint32_t Height);
Kojto 107:4f6c30876dfa 432 HAL_StatusTypeDef HAL_DMA2D_BlendingStart_IT(DMA2D_HandleTypeDef *hdma2d, uint32_t SrcAddress1, uint32_t SrcAddress2, uint32_t DstAddress, uint32_t Width, uint32_t Height);
Kojto 107:4f6c30876dfa 433 HAL_StatusTypeDef HAL_DMA2D_Suspend(DMA2D_HandleTypeDef *hdma2d);
Kojto 107:4f6c30876dfa 434 HAL_StatusTypeDef HAL_DMA2D_Resume(DMA2D_HandleTypeDef *hdma2d);
Kojto 107:4f6c30876dfa 435 HAL_StatusTypeDef HAL_DMA2D_Abort(DMA2D_HandleTypeDef *hdma2d);
Kojto 107:4f6c30876dfa 436 HAL_StatusTypeDef HAL_DMA2D_PollForTransfer(DMA2D_HandleTypeDef *hdma2d, uint32_t Timeout);
Kojto 107:4f6c30876dfa 437 void HAL_DMA2D_IRQHandler(DMA2D_HandleTypeDef *hdma2d);
Kojto 107:4f6c30876dfa 438
Kojto 107:4f6c30876dfa 439 /* Peripheral Control functions *************************************************/
Kojto 107:4f6c30876dfa 440 HAL_StatusTypeDef HAL_DMA2D_ConfigLayer(DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx);
Kojto 107:4f6c30876dfa 441 HAL_StatusTypeDef HAL_DMA2D_ConfigCLUT(DMA2D_HandleTypeDef *hdma2d, DMA2D_CLUTCfgTypeDef CLUTCfg, uint32_t LayerIdx);
Kojto 107:4f6c30876dfa 442 HAL_StatusTypeDef HAL_DMA2D_EnableCLUT(DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx);
Kojto 107:4f6c30876dfa 443 HAL_StatusTypeDef HAL_DMA2D_DisableCLUT(DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx);
Kojto 107:4f6c30876dfa 444 HAL_StatusTypeDef HAL_DMA2D_ProgramLineEvent(DMA2D_HandleTypeDef *hdma2d, uint32_t Line);
Kojto 107:4f6c30876dfa 445
Kojto 107:4f6c30876dfa 446 /* Peripheral State functions ***************************************************/
Kojto 107:4f6c30876dfa 447 HAL_DMA2D_StateTypeDef HAL_DMA2D_GetState(DMA2D_HandleTypeDef *hdma2d);
Kojto 107:4f6c30876dfa 448 uint32_t HAL_DMA2D_GetError(DMA2D_HandleTypeDef *hdma2d);
Kojto 107:4f6c30876dfa 449 /**
Kojto 107:4f6c30876dfa 450 * @}
Kojto 107:4f6c30876dfa 451 */
Kojto 107:4f6c30876dfa 452
Kojto 107:4f6c30876dfa 453 /* Private types -------------------------------------------------------------*/
Kojto 107:4f6c30876dfa 454 /** @defgroup DMA2D_Private_Types DMA2D Private Types
Kojto 107:4f6c30876dfa 455 * @{
Kojto 107:4f6c30876dfa 456 */
Kojto 107:4f6c30876dfa 457
Kojto 107:4f6c30876dfa 458 /**
Kojto 107:4f6c30876dfa 459 * @}
Kojto 107:4f6c30876dfa 460 */
Kojto 107:4f6c30876dfa 461
Kojto 107:4f6c30876dfa 462 /* Private defines -------------------------------------------------------------*/
Kojto 107:4f6c30876dfa 463 /** @defgroup DMA2D_Private_Defines DMA2D Private Defines
Kojto 107:4f6c30876dfa 464 * @{
Kojto 107:4f6c30876dfa 465 */
Kojto 107:4f6c30876dfa 466
Kojto 107:4f6c30876dfa 467 /**
Kojto 107:4f6c30876dfa 468 * @}
Kojto 107:4f6c30876dfa 469 */
Kojto 107:4f6c30876dfa 470
Kojto 107:4f6c30876dfa 471 /* Private variables ---------------------------------------------------------*/
Kojto 107:4f6c30876dfa 472 /** @defgroup DMA2D_Private_Variables DMA2D Private Variables
Kojto 107:4f6c30876dfa 473 * @{
Kojto 107:4f6c30876dfa 474 */
Kojto 107:4f6c30876dfa 475
Kojto 107:4f6c30876dfa 476 /**
Kojto 107:4f6c30876dfa 477 * @}
Kojto 107:4f6c30876dfa 478 */
Kojto 107:4f6c30876dfa 479
Kojto 107:4f6c30876dfa 480 /* Private constants ---------------------------------------------------------*/
Kojto 107:4f6c30876dfa 481 /** @defgroup DMA2D_Private_Constants DMA2D Private Constants
Kojto 107:4f6c30876dfa 482 * @{
Kojto 107:4f6c30876dfa 483 */
Kojto 107:4f6c30876dfa 484
Kojto 107:4f6c30876dfa 485 /**
Kojto 107:4f6c30876dfa 486 * @}
Kojto 107:4f6c30876dfa 487 */
Kojto 107:4f6c30876dfa 488
Kojto 107:4f6c30876dfa 489 /* Private macros ------------------------------------------------------------*/
Kojto 107:4f6c30876dfa 490 /** @defgroup DMA2D_Private_Macros DMA2D Private Macros
Kojto 107:4f6c30876dfa 491 * @{
Kojto 107:4f6c30876dfa 492 */
Kojto 107:4f6c30876dfa 493 #define IS_DMA2D_LAYER(LAYER) ((LAYER) <= MAX_DMA2D_LAYER)
Kojto 107:4f6c30876dfa 494 #define IS_DMA2D_MODE(MODE) (((MODE) == DMA2D_M2M) || ((MODE) == DMA2D_M2M_PFC) || \
Kojto 107:4f6c30876dfa 495 ((MODE) == DMA2D_M2M_BLEND) || ((MODE) == DMA2D_R2M))
Kojto 107:4f6c30876dfa 496 #define IS_DMA2D_CMODE(MODE_ARGB) (((MODE_ARGB) == DMA2D_ARGB8888) || ((MODE_ARGB) == DMA2D_RGB888) || \
Kojto 107:4f6c30876dfa 497 ((MODE_ARGB) == DMA2D_RGB565) || ((MODE_ARGB) == DMA2D_ARGB1555) || \
Kojto 107:4f6c30876dfa 498 ((MODE_ARGB) == DMA2D_ARGB4444))
Kojto 107:4f6c30876dfa 499 #define IS_DMA2D_COLOR(COLOR) ((COLOR) <= COLOR_VALUE)
Kojto 107:4f6c30876dfa 500 #define IS_DMA2D_LINE(LINE) ((LINE) <= DMA2D_LINE)
Kojto 107:4f6c30876dfa 501 #define IS_DMA2D_PIXEL(PIXEL) ((PIXEL) <= DMA2D_PIXEL)
Kojto 107:4f6c30876dfa 502 #define IS_DMA2D_OFFSET(OOFFSET) ((OOFFSET) <= DMA2D_OFFSET)
Kojto 107:4f6c30876dfa 503 #define IS_DMA2D_INPUT_COLOR_MODE(INPUT_CM) (((INPUT_CM) == CM_ARGB8888) || ((INPUT_CM) == CM_RGB888) || \
Kojto 107:4f6c30876dfa 504 ((INPUT_CM) == CM_RGB565) || ((INPUT_CM) == CM_ARGB1555) || \
Kojto 107:4f6c30876dfa 505 ((INPUT_CM) == CM_ARGB4444) || ((INPUT_CM) == CM_L8) || \
Kojto 107:4f6c30876dfa 506 ((INPUT_CM) == CM_AL44) || ((INPUT_CM) == CM_AL88) || \
Kojto 107:4f6c30876dfa 507 ((INPUT_CM) == CM_L4) || ((INPUT_CM) == CM_A8) || \
Kojto 107:4f6c30876dfa 508 ((INPUT_CM) == CM_A4))
Kojto 107:4f6c30876dfa 509 #define IS_DMA2D_ALPHA_MODE(AlphaMode) (((AlphaMode) == DMA2D_NO_MODIF_ALPHA) || \
Kojto 107:4f6c30876dfa 510 ((AlphaMode) == DMA2D_REPLACE_ALPHA) || \
Kojto 107:4f6c30876dfa 511 ((AlphaMode) == DMA2D_COMBINE_ALPHA))
Kojto 107:4f6c30876dfa 512 #define IS_DMA2D_CLUT_CM(CLUT_CM) (((CLUT_CM) == DMA2D_CCM_ARGB8888) || ((CLUT_CM) == DMA2D_CCM_RGB888))
Kojto 107:4f6c30876dfa 513 #define IS_DMA2D_CLUT_SIZE(CLUT_SIZE) ((CLUT_SIZE) <= DMA2D_CLUT_SIZE)
Kojto 107:4f6c30876dfa 514 #define IS_DMA2D_LineWatermark(LineWatermark) ((LineWatermark) <= LINE_WATERMARK)
Kojto 107:4f6c30876dfa 515 #define IS_DMA2D_IT(IT) (((IT) == DMA2D_IT_CTC) || ((IT) == DMA2D_IT_CAE) || \
Kojto 107:4f6c30876dfa 516 ((IT) == DMA2D_IT_TW) || ((IT) == DMA2D_IT_TC) || \
Kojto 107:4f6c30876dfa 517 ((IT) == DMA2D_IT_TE) || ((IT) == DMA2D_IT_CE))
Kojto 107:4f6c30876dfa 518 #define IS_DMA2D_GET_FLAG(FLAG) (((FLAG) == DMA2D_FLAG_CTC) || ((FLAG) == DMA2D_FLAG_CAE) || \
Kojto 107:4f6c30876dfa 519 ((FLAG) == DMA2D_FLAG_TW) || ((FLAG) == DMA2D_FLAG_TC) || \
Kojto 107:4f6c30876dfa 520 ((FLAG) == DMA2D_FLAG_TE) || ((FLAG) == DMA2D_FLAG_CE))
Kojto 107:4f6c30876dfa 521 /**
Kojto 107:4f6c30876dfa 522 * @}
Kojto 107:4f6c30876dfa 523 */
Kojto 107:4f6c30876dfa 524
Kojto 107:4f6c30876dfa 525 /* Private functions prototypes ---------------------------------------------------------*/
Kojto 107:4f6c30876dfa 526 /** @defgroup DMA2D_Private_Functions_Prototypes DMA2D Private Functions Prototypes
Kojto 107:4f6c30876dfa 527 * @{
Kojto 107:4f6c30876dfa 528 */
Kojto 107:4f6c30876dfa 529
Kojto 107:4f6c30876dfa 530 /**
Kojto 107:4f6c30876dfa 531 * @}
Kojto 107:4f6c30876dfa 532 */
Kojto 107:4f6c30876dfa 533
Kojto 107:4f6c30876dfa 534 /* Private functions ---------------------------------------------------------*/
Kojto 107:4f6c30876dfa 535 /** @defgroup DMA2D_Private_Functions DMA2D Private Functions
Kojto 107:4f6c30876dfa 536 * @{
Kojto 107:4f6c30876dfa 537 */
Kojto 107:4f6c30876dfa 538
Kojto 107:4f6c30876dfa 539 /**
Kojto 107:4f6c30876dfa 540 * @}
Kojto 107:4f6c30876dfa 541 */
Kojto 107:4f6c30876dfa 542
Kojto 107:4f6c30876dfa 543 /**
Kojto 107:4f6c30876dfa 544 * @}
Kojto 107:4f6c30876dfa 545 */
Kojto 107:4f6c30876dfa 546
Kojto 107:4f6c30876dfa 547 /**
Kojto 107:4f6c30876dfa 548 * @}
Kojto 107:4f6c30876dfa 549 */
Kojto 107:4f6c30876dfa 550
Kojto 107:4f6c30876dfa 551
Kojto 107:4f6c30876dfa 552 #ifdef __cplusplus
Kojto 107:4f6c30876dfa 553 }
Kojto 107:4f6c30876dfa 554 #endif
Kojto 107:4f6c30876dfa 555
Kojto 107:4f6c30876dfa 556 #endif /* __STM32F7xx_HAL_DMA2D_H */
Kojto 107:4f6c30876dfa 557
Kojto 107:4f6c30876dfa 558
Kojto 107:4f6c30876dfa 559 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/