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