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