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