mbed library sources
Fork of mbed-src by
targets/cmsis/TARGET_STM/TARGET_NUCLEO_F411RE/stm32f4xx_hal_ltdc.h@308:59cc78a25982, 2014-09-05 (annotated)
- Committer:
- todotani
- Date:
- Fri Sep 05 14:20:33 2014 +0000
- Revision:
- 308:59cc78a25982
- Parent:
- 235:685d5f11838f
BLE_Health_Thermometer for mbed HRM1017 with BLE library 0.1.0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 235:685d5f11838f | 1 | /** |
mbed_official | 235:685d5f11838f | 2 | ****************************************************************************** |
mbed_official | 235:685d5f11838f | 3 | * @file stm32f4xx_hal_ltdc.h |
mbed_official | 235:685d5f11838f | 4 | * @author MCD Application Team |
mbed_official | 235:685d5f11838f | 5 | * @version V1.1.0 |
mbed_official | 235:685d5f11838f | 6 | * @date 19-June-2014 |
mbed_official | 235:685d5f11838f | 7 | * @brief Header file of LTDC HAL module. |
mbed_official | 235:685d5f11838f | 8 | ****************************************************************************** |
mbed_official | 235:685d5f11838f | 9 | * @attention |
mbed_official | 235:685d5f11838f | 10 | * |
mbed_official | 235:685d5f11838f | 11 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
mbed_official | 235:685d5f11838f | 12 | * |
mbed_official | 235:685d5f11838f | 13 | * Redistribution and use in source and binary forms, with or without modification, |
mbed_official | 235:685d5f11838f | 14 | * are permitted provided that the following conditions are met: |
mbed_official | 235:685d5f11838f | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 235:685d5f11838f | 16 | * this list of conditions and the following disclaimer. |
mbed_official | 235:685d5f11838f | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 235:685d5f11838f | 18 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 235:685d5f11838f | 19 | * and/or other materials provided with the distribution. |
mbed_official | 235:685d5f11838f | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mbed_official | 235:685d5f11838f | 21 | * may be used to endorse or promote products derived from this software |
mbed_official | 235:685d5f11838f | 22 | * without specific prior written permission. |
mbed_official | 235:685d5f11838f | 23 | * |
mbed_official | 235:685d5f11838f | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 235:685d5f11838f | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mbed_official | 235:685d5f11838f | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mbed_official | 235:685d5f11838f | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mbed_official | 235:685d5f11838f | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 235:685d5f11838f | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mbed_official | 235:685d5f11838f | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mbed_official | 235:685d5f11838f | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mbed_official | 235:685d5f11838f | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mbed_official | 235:685d5f11838f | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 235:685d5f11838f | 34 | * |
mbed_official | 235:685d5f11838f | 35 | ****************************************************************************** |
mbed_official | 235:685d5f11838f | 36 | */ |
mbed_official | 235:685d5f11838f | 37 | |
mbed_official | 235:685d5f11838f | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
mbed_official | 235:685d5f11838f | 39 | #ifndef __STM32F4xx_HAL_LTDC_H |
mbed_official | 235:685d5f11838f | 40 | #define __STM32F4xx_HAL_LTDC_H |
mbed_official | 235:685d5f11838f | 41 | |
mbed_official | 235:685d5f11838f | 42 | #ifdef __cplusplus |
mbed_official | 235:685d5f11838f | 43 | extern "C" { |
mbed_official | 235:685d5f11838f | 44 | #endif |
mbed_official | 235:685d5f11838f | 45 | |
mbed_official | 235:685d5f11838f | 46 | #if defined(STM32F429xx) || defined(STM32F439xx) |
mbed_official | 235:685d5f11838f | 47 | /* Includes ------------------------------------------------------------------*/ |
mbed_official | 235:685d5f11838f | 48 | #include "stm32f4xx_hal_def.h" |
mbed_official | 235:685d5f11838f | 49 | |
mbed_official | 235:685d5f11838f | 50 | |
mbed_official | 235:685d5f11838f | 51 | /** @addtogroup STM32F4xx_HAL_Driver |
mbed_official | 235:685d5f11838f | 52 | * @{ |
mbed_official | 235:685d5f11838f | 53 | */ |
mbed_official | 235:685d5f11838f | 54 | |
mbed_official | 235:685d5f11838f | 55 | /** @addtogroup LTDC |
mbed_official | 235:685d5f11838f | 56 | * @{ |
mbed_official | 235:685d5f11838f | 57 | */ |
mbed_official | 235:685d5f11838f | 58 | |
mbed_official | 235:685d5f11838f | 59 | /* Exported types ------------------------------------------------------------*/ |
mbed_official | 235:685d5f11838f | 60 | |
mbed_official | 235:685d5f11838f | 61 | #define MAX_LAYER 2 |
mbed_official | 235:685d5f11838f | 62 | |
mbed_official | 235:685d5f11838f | 63 | /** |
mbed_official | 235:685d5f11838f | 64 | * @brief LTDC color structure definition |
mbed_official | 235:685d5f11838f | 65 | */ |
mbed_official | 235:685d5f11838f | 66 | typedef struct |
mbed_official | 235:685d5f11838f | 67 | { |
mbed_official | 235:685d5f11838f | 68 | uint8_t Blue; /*!< Configures the blue value. |
mbed_official | 235:685d5f11838f | 69 | This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */ |
mbed_official | 235:685d5f11838f | 70 | |
mbed_official | 235:685d5f11838f | 71 | uint8_t Green; /*!< Configures the green value. |
mbed_official | 235:685d5f11838f | 72 | This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */ |
mbed_official | 235:685d5f11838f | 73 | |
mbed_official | 235:685d5f11838f | 74 | uint8_t Red; /*!< Configures the red value. |
mbed_official | 235:685d5f11838f | 75 | This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */ |
mbed_official | 235:685d5f11838f | 76 | |
mbed_official | 235:685d5f11838f | 77 | uint8_t Reserved; /*!< Reserved 0xFF */ |
mbed_official | 235:685d5f11838f | 78 | } LTDC_ColorTypeDef; |
mbed_official | 235:685d5f11838f | 79 | |
mbed_official | 235:685d5f11838f | 80 | /** |
mbed_official | 235:685d5f11838f | 81 | * @brief LTDC Init structure definition |
mbed_official | 235:685d5f11838f | 82 | */ |
mbed_official | 235:685d5f11838f | 83 | typedef struct |
mbed_official | 235:685d5f11838f | 84 | { |
mbed_official | 235:685d5f11838f | 85 | uint32_t HSPolarity; /*!< configures the horizontal synchronization polarity. |
mbed_official | 235:685d5f11838f | 86 | This parameter can be one value of @ref LTDC_HS_POLARITY */ |
mbed_official | 235:685d5f11838f | 87 | |
mbed_official | 235:685d5f11838f | 88 | uint32_t VSPolarity; /*!< configures the vertical synchronization polarity. |
mbed_official | 235:685d5f11838f | 89 | This parameter can be one value of @ref LTDC_VS_POLARITY */ |
mbed_official | 235:685d5f11838f | 90 | |
mbed_official | 235:685d5f11838f | 91 | uint32_t DEPolarity; /*!< configures the data enable polarity. |
mbed_official | 235:685d5f11838f | 92 | This parameter can be one of value of @ref LTDC_DE_POLARITY */ |
mbed_official | 235:685d5f11838f | 93 | |
mbed_official | 235:685d5f11838f | 94 | uint32_t PCPolarity; /*!< configures the pixel clock polarity. |
mbed_official | 235:685d5f11838f | 95 | This parameter can be one of value of @ref LTDC_PC_POLARITY */ |
mbed_official | 235:685d5f11838f | 96 | |
mbed_official | 235:685d5f11838f | 97 | uint32_t HorizontalSync; /*!< configures the number of Horizontal synchronization width. |
mbed_official | 235:685d5f11838f | 98 | This parameter must be a number between Min_Data = 0x000 and Max_Data = 0xFFF. */ |
mbed_official | 235:685d5f11838f | 99 | |
mbed_official | 235:685d5f11838f | 100 | uint32_t VerticalSync; /*!< configures the number of Vertical synchronization heigh. |
mbed_official | 235:685d5f11838f | 101 | This parameter must be a number between Min_Data = 0x000 and Max_Data = 0x7FF. */ |
mbed_official | 235:685d5f11838f | 102 | |
mbed_official | 235:685d5f11838f | 103 | uint32_t AccumulatedHBP; /*!< configures the accumulated horizontal back porch width. |
mbed_official | 235:685d5f11838f | 104 | This parameter must be a number between Min_Data = LTDC_HorizontalSync and Max_Data = 0xFFF. */ |
mbed_official | 235:685d5f11838f | 105 | |
mbed_official | 235:685d5f11838f | 106 | uint32_t AccumulatedVBP; /*!< configures the accumulated vertical back porch heigh. |
mbed_official | 235:685d5f11838f | 107 | This parameter must be a number between Min_Data = LTDC_VerticalSync and Max_Data = 0x7FF. */ |
mbed_official | 235:685d5f11838f | 108 | |
mbed_official | 235:685d5f11838f | 109 | uint32_t AccumulatedActiveW; /*!< configures the accumulated active width. |
mbed_official | 235:685d5f11838f | 110 | This parameter must be a number between Min_Data = LTDC_AccumulatedHBP and Max_Data = 0xFFF. */ |
mbed_official | 235:685d5f11838f | 111 | |
mbed_official | 235:685d5f11838f | 112 | uint32_t AccumulatedActiveH; /*!< configures the accumulated active heigh. |
mbed_official | 235:685d5f11838f | 113 | This parameter must be a number between Min_Data = LTDC_AccumulatedVBP and Max_Data = 0x7FF. */ |
mbed_official | 235:685d5f11838f | 114 | |
mbed_official | 235:685d5f11838f | 115 | uint32_t TotalWidth; /*!< configures the total width. |
mbed_official | 235:685d5f11838f | 116 | This parameter must be a number between Min_Data = LTDC_AccumulatedActiveW and Max_Data = 0xFFF. */ |
mbed_official | 235:685d5f11838f | 117 | |
mbed_official | 235:685d5f11838f | 118 | uint32_t TotalHeigh; /*!< configures the total heigh. |
mbed_official | 235:685d5f11838f | 119 | This parameter must be a number between Min_Data = LTDC_AccumulatedActiveH and Max_Data = 0x7FF. */ |
mbed_official | 235:685d5f11838f | 120 | |
mbed_official | 235:685d5f11838f | 121 | LTDC_ColorTypeDef Backcolor; /*!< Configures the background color. */ |
mbed_official | 235:685d5f11838f | 122 | } LTDC_InitTypeDef; |
mbed_official | 235:685d5f11838f | 123 | |
mbed_official | 235:685d5f11838f | 124 | |
mbed_official | 235:685d5f11838f | 125 | /** |
mbed_official | 235:685d5f11838f | 126 | * @brief LTDC Layer structure definition |
mbed_official | 235:685d5f11838f | 127 | */ |
mbed_official | 235:685d5f11838f | 128 | typedef struct |
mbed_official | 235:685d5f11838f | 129 | { |
mbed_official | 235:685d5f11838f | 130 | uint32_t WindowX0; /*!< Configures the Window Horizontal Start Position. |
mbed_official | 235:685d5f11838f | 131 | This parameter must be a number between Min_Data = 0x000 and Max_Data = 0xFFF. */ |
mbed_official | 235:685d5f11838f | 132 | |
mbed_official | 235:685d5f11838f | 133 | uint32_t WindowX1; /*!< Configures the Window Horizontal Stop Position. |
mbed_official | 235:685d5f11838f | 134 | This parameter must be a number between Min_Data = 0x000 and Max_Data = 0xFFF. */ |
mbed_official | 235:685d5f11838f | 135 | |
mbed_official | 235:685d5f11838f | 136 | uint32_t WindowY0; /*!< Configures the Window vertical Start Position. |
mbed_official | 235:685d5f11838f | 137 | This parameter must be a number between Min_Data = 0x000 and Max_Data = 0xFFF. */ |
mbed_official | 235:685d5f11838f | 138 | |
mbed_official | 235:685d5f11838f | 139 | uint32_t WindowY1; /*!< Configures the Window vertical Stop Position. |
mbed_official | 235:685d5f11838f | 140 | This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF. */ |
mbed_official | 235:685d5f11838f | 141 | |
mbed_official | 235:685d5f11838f | 142 | uint32_t PixelFormat; /*!< Specifies the pixel format. |
mbed_official | 235:685d5f11838f | 143 | This parameter can be one of value of @ref LTDC_Pixelformat */ |
mbed_official | 235:685d5f11838f | 144 | |
mbed_official | 235:685d5f11838f | 145 | uint32_t Alpha; /*!< Specifies the constant alpha used for blending. |
mbed_official | 235:685d5f11838f | 146 | This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */ |
mbed_official | 235:685d5f11838f | 147 | |
mbed_official | 235:685d5f11838f | 148 | uint32_t Alpha0; /*!< Configures the default alpha value. |
mbed_official | 235:685d5f11838f | 149 | This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */ |
mbed_official | 235:685d5f11838f | 150 | |
mbed_official | 235:685d5f11838f | 151 | uint32_t BlendingFactor1; /*!< Select the blending factor 1. |
mbed_official | 235:685d5f11838f | 152 | This parameter can be one of value of @ref LTDC_BlendingFactor1 */ |
mbed_official | 235:685d5f11838f | 153 | |
mbed_official | 235:685d5f11838f | 154 | uint32_t BlendingFactor2; /*!< Select the blending factor 2. |
mbed_official | 235:685d5f11838f | 155 | This parameter can be one of value of @ref LTDC_BlendingFactor2 */ |
mbed_official | 235:685d5f11838f | 156 | |
mbed_official | 235:685d5f11838f | 157 | uint32_t FBStartAdress; /*!< Configures the color frame buffer address */ |
mbed_official | 235:685d5f11838f | 158 | |
mbed_official | 235:685d5f11838f | 159 | uint32_t ImageWidth; /*!< Configures the color frame buffer line length. |
mbed_official | 235:685d5f11838f | 160 | This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0x1FFF. */ |
mbed_official | 235:685d5f11838f | 161 | |
mbed_official | 235:685d5f11838f | 162 | uint32_t ImageHeight; /*!< Specifies the number of line in frame buffer. |
mbed_official | 235:685d5f11838f | 163 | This parameter must be a number between Min_Data = 0x000 and Max_Data = 0x7FF. */ |
mbed_official | 235:685d5f11838f | 164 | |
mbed_official | 235:685d5f11838f | 165 | LTDC_ColorTypeDef Backcolor; /*!< Configures the layer background color. */ |
mbed_official | 235:685d5f11838f | 166 | } LTDC_LayerCfgTypeDef; |
mbed_official | 235:685d5f11838f | 167 | |
mbed_official | 235:685d5f11838f | 168 | /** |
mbed_official | 235:685d5f11838f | 169 | * @brief HAL LTDC State structures definition |
mbed_official | 235:685d5f11838f | 170 | */ |
mbed_official | 235:685d5f11838f | 171 | typedef enum |
mbed_official | 235:685d5f11838f | 172 | { |
mbed_official | 235:685d5f11838f | 173 | HAL_LTDC_STATE_RESET = 0x00, /*!< LTDC not yet initialized or disabled */ |
mbed_official | 235:685d5f11838f | 174 | HAL_LTDC_STATE_READY = 0x01, /*!< LTDC initialized and ready for use */ |
mbed_official | 235:685d5f11838f | 175 | HAL_LTDC_STATE_BUSY = 0x02, /*!< LTDC internal process is ongoing */ |
mbed_official | 235:685d5f11838f | 176 | HAL_LTDC_STATE_TIMEOUT = 0x03, /*!< LTDC Timeout state */ |
mbed_official | 235:685d5f11838f | 177 | HAL_LTDC_STATE_ERROR = 0x04 /*!< LTDC state error */ |
mbed_official | 235:685d5f11838f | 178 | }HAL_LTDC_StateTypeDef; |
mbed_official | 235:685d5f11838f | 179 | |
mbed_official | 235:685d5f11838f | 180 | /** |
mbed_official | 235:685d5f11838f | 181 | * @brief LTDC handle Structure definition |
mbed_official | 235:685d5f11838f | 182 | */ |
mbed_official | 235:685d5f11838f | 183 | typedef struct |
mbed_official | 235:685d5f11838f | 184 | { |
mbed_official | 235:685d5f11838f | 185 | LTDC_TypeDef *Instance; /*!< LTDC Register base address */ |
mbed_official | 235:685d5f11838f | 186 | |
mbed_official | 235:685d5f11838f | 187 | LTDC_InitTypeDef Init; /*!< LTDC parameters */ |
mbed_official | 235:685d5f11838f | 188 | |
mbed_official | 235:685d5f11838f | 189 | LTDC_LayerCfgTypeDef LayerCfg[MAX_LAYER]; /*!< LTDC Layers parameters */ |
mbed_official | 235:685d5f11838f | 190 | |
mbed_official | 235:685d5f11838f | 191 | HAL_LockTypeDef Lock; /*!< LTDC Lock */ |
mbed_official | 235:685d5f11838f | 192 | |
mbed_official | 235:685d5f11838f | 193 | __IO HAL_LTDC_StateTypeDef State; /*!< LTDC state */ |
mbed_official | 235:685d5f11838f | 194 | |
mbed_official | 235:685d5f11838f | 195 | __IO uint32_t ErrorCode; /*!< LTDC Error code */ |
mbed_official | 235:685d5f11838f | 196 | |
mbed_official | 235:685d5f11838f | 197 | } LTDC_HandleTypeDef; |
mbed_official | 235:685d5f11838f | 198 | |
mbed_official | 235:685d5f11838f | 199 | /* Exported constants --------------------------------------------------------*/ |
mbed_official | 235:685d5f11838f | 200 | /** @defgroup LTDC_Exported_Constants |
mbed_official | 235:685d5f11838f | 201 | * @{ |
mbed_official | 235:685d5f11838f | 202 | */ |
mbed_official | 235:685d5f11838f | 203 | |
mbed_official | 235:685d5f11838f | 204 | /** @defgroup LTDC_Layer |
mbed_official | 235:685d5f11838f | 205 | * @{ |
mbed_official | 235:685d5f11838f | 206 | */ |
mbed_official | 235:685d5f11838f | 207 | #define IS_LTDC_LAYER(LAYER) ((LAYER) <= MAX_LAYER) |
mbed_official | 235:685d5f11838f | 208 | /** |
mbed_official | 235:685d5f11838f | 209 | * @} |
mbed_official | 235:685d5f11838f | 210 | */ |
mbed_official | 235:685d5f11838f | 211 | |
mbed_official | 235:685d5f11838f | 212 | /** @defgroup LTDC Error Code |
mbed_official | 235:685d5f11838f | 213 | * @{ |
mbed_official | 235:685d5f11838f | 214 | */ |
mbed_official | 235:685d5f11838f | 215 | #define HAL_LTDC_ERROR_NONE ((uint32_t)0x00000000) /*!< LTDC No error */ |
mbed_official | 235:685d5f11838f | 216 | #define HAL_LTDC_ERROR_TE ((uint32_t)0x00000001) /*!< LTDC Transfer error */ |
mbed_official | 235:685d5f11838f | 217 | #define HAL_LTDC_ERROR_FU ((uint32_t)0x00000002) /*!< LTDC FIFO Underrun */ |
mbed_official | 235:685d5f11838f | 218 | #define HAL_LTDC_ERROR_TIMEOUT ((uint32_t)0x00000020) /*!< LTDC Timeout error */ |
mbed_official | 235:685d5f11838f | 219 | |
mbed_official | 235:685d5f11838f | 220 | /** |
mbed_official | 235:685d5f11838f | 221 | * @} |
mbed_official | 235:685d5f11838f | 222 | */ |
mbed_official | 235:685d5f11838f | 223 | |
mbed_official | 235:685d5f11838f | 224 | /** @defgroup LTDC_HS_POLARITY |
mbed_official | 235:685d5f11838f | 225 | * @{ |
mbed_official | 235:685d5f11838f | 226 | */ |
mbed_official | 235:685d5f11838f | 227 | #define LTDC_HSPOLARITY_AL ((uint32_t)0x00000000) /*!< Horizontal Synchronization is active low. */ |
mbed_official | 235:685d5f11838f | 228 | #define LTDC_HSPOLARITY_AH LTDC_GCR_HSPOL /*!< Horizontal Synchronization is active high. */ |
mbed_official | 235:685d5f11838f | 229 | |
mbed_official | 235:685d5f11838f | 230 | #define IS_LTDC_HSPOL(HSPOL) (((HSPOL) == LTDC_HSPOLARITY_AL) || \ |
mbed_official | 235:685d5f11838f | 231 | ((HSPOL) == LTDC_HSPOLARITY_AH)) |
mbed_official | 235:685d5f11838f | 232 | /** |
mbed_official | 235:685d5f11838f | 233 | * @} |
mbed_official | 235:685d5f11838f | 234 | */ |
mbed_official | 235:685d5f11838f | 235 | |
mbed_official | 235:685d5f11838f | 236 | /** @defgroup LTDC_VS_POLARITY |
mbed_official | 235:685d5f11838f | 237 | * @{ |
mbed_official | 235:685d5f11838f | 238 | */ |
mbed_official | 235:685d5f11838f | 239 | #define LTDC_VSPOLARITY_AL ((uint32_t)0x00000000) /*!< Vertical Synchronization is active low. */ |
mbed_official | 235:685d5f11838f | 240 | #define LTDC_VSPOLARITY_AH LTDC_GCR_VSPOL /*!< Vertical Synchronization is active high. */ |
mbed_official | 235:685d5f11838f | 241 | |
mbed_official | 235:685d5f11838f | 242 | #define IS_LTDC_VSPOL(VSPOL) (((VSPOL) == LTDC_VSPOLARITY_AL) || \ |
mbed_official | 235:685d5f11838f | 243 | ((VSPOL) == LTDC_VSPOLARITY_AH)) |
mbed_official | 235:685d5f11838f | 244 | /** |
mbed_official | 235:685d5f11838f | 245 | * @} |
mbed_official | 235:685d5f11838f | 246 | */ |
mbed_official | 235:685d5f11838f | 247 | |
mbed_official | 235:685d5f11838f | 248 | /** @defgroup LTDC_DE_POLARITY |
mbed_official | 235:685d5f11838f | 249 | * @{ |
mbed_official | 235:685d5f11838f | 250 | */ |
mbed_official | 235:685d5f11838f | 251 | #define LTDC_DEPOLARITY_AL ((uint32_t)0x00000000) /*!< Data Enable, is active low. */ |
mbed_official | 235:685d5f11838f | 252 | #define LTDC_DEPOLARITY_AH LTDC_GCR_DEPOL /*!< Data Enable, is active high. */ |
mbed_official | 235:685d5f11838f | 253 | |
mbed_official | 235:685d5f11838f | 254 | #define IS_LTDC_DEPOL(DEPOL) (((DEPOL) == LTDC_DEPOLARITY_AL) || \ |
mbed_official | 235:685d5f11838f | 255 | ((DEPOL) == LTDC_DEPOLARITY_AH)) |
mbed_official | 235:685d5f11838f | 256 | /** |
mbed_official | 235:685d5f11838f | 257 | * @} |
mbed_official | 235:685d5f11838f | 258 | */ |
mbed_official | 235:685d5f11838f | 259 | |
mbed_official | 235:685d5f11838f | 260 | /** @defgroup LTDC_PC_POLARITY |
mbed_official | 235:685d5f11838f | 261 | * @{ |
mbed_official | 235:685d5f11838f | 262 | */ |
mbed_official | 235:685d5f11838f | 263 | #define LTDC_PCPOLARITY_IPC ((uint32_t)0x00000000) /*!< input pixel clock. */ |
mbed_official | 235:685d5f11838f | 264 | #define LTDC_PCPOLARITY_IIPC LTDC_GCR_PCPOL /*!< inverted input pixel clock. */ |
mbed_official | 235:685d5f11838f | 265 | |
mbed_official | 235:685d5f11838f | 266 | #define IS_LTDC_PCPOL(PCPOL) (((PCPOL) == LTDC_PCPOLARITY_IPC) || \ |
mbed_official | 235:685d5f11838f | 267 | ((PCPOL) == LTDC_PCPOLARITY_IIPC)) |
mbed_official | 235:685d5f11838f | 268 | /** |
mbed_official | 235:685d5f11838f | 269 | * @} |
mbed_official | 235:685d5f11838f | 270 | */ |
mbed_official | 235:685d5f11838f | 271 | |
mbed_official | 235:685d5f11838f | 272 | /** @defgroup LTDC_SYNC |
mbed_official | 235:685d5f11838f | 273 | * @{ |
mbed_official | 235:685d5f11838f | 274 | */ |
mbed_official | 235:685d5f11838f | 275 | #define LTDC_HORIZONTALSYNC (LTDC_SSCR_HSW >> 16) /*!< Horizontal synchronization width. */ |
mbed_official | 235:685d5f11838f | 276 | #define LTDC_VERTICALSYNC LTDC_SSCR_VSH /*!< Vertical synchronization heigh. */ |
mbed_official | 235:685d5f11838f | 277 | |
mbed_official | 235:685d5f11838f | 278 | #define IS_LTDC_HSYNC(HSYNC) ((HSYNC) <= LTDC_HORIZONTALSYNC) |
mbed_official | 235:685d5f11838f | 279 | #define IS_LTDC_VSYNC(VSYNC) ((VSYNC) <= LTDC_VERTICALSYNC) |
mbed_official | 235:685d5f11838f | 280 | #define IS_LTDC_AHBP(AHBP) ((AHBP) <= LTDC_HORIZONTALSYNC) |
mbed_official | 235:685d5f11838f | 281 | #define IS_LTDC_AVBP(AVBP) ((AVBP) <= LTDC_VERTICALSYNC) |
mbed_official | 235:685d5f11838f | 282 | #define IS_LTDC_AAW(AAW) ((AAW) <= LTDC_HORIZONTALSYNC) |
mbed_official | 235:685d5f11838f | 283 | #define IS_LTDC_AAH(AAH) ((AAH) <= LTDC_VERTICALSYNC) |
mbed_official | 235:685d5f11838f | 284 | #define IS_LTDC_TOTALW(TOTALW) ((TOTALW) <= LTDC_HORIZONTALSYNC) |
mbed_official | 235:685d5f11838f | 285 | #define IS_LTDC_TOTALH(TOTALH) ((TOTALH) <= LTDC_VERTICALSYNC) |
mbed_official | 235:685d5f11838f | 286 | /** |
mbed_official | 235:685d5f11838f | 287 | * @} |
mbed_official | 235:685d5f11838f | 288 | */ |
mbed_official | 235:685d5f11838f | 289 | |
mbed_official | 235:685d5f11838f | 290 | /** @defgroup LTDC_BACK_COLOR |
mbed_official | 235:685d5f11838f | 291 | * @{ |
mbed_official | 235:685d5f11838f | 292 | */ |
mbed_official | 235:685d5f11838f | 293 | #define LTDC_COLOR ((uint32_t)0x000000FF) /*!< Color mask */ |
mbed_official | 235:685d5f11838f | 294 | |
mbed_official | 235:685d5f11838f | 295 | #define IS_LTDC_BLUEVALUE(BBLUE) ((BBLUE) <= LTDC_COLOR) |
mbed_official | 235:685d5f11838f | 296 | #define IS_LTDC_GREENVALUE(BGREEN) ((BGREEN) <= LTDC_COLOR) |
mbed_official | 235:685d5f11838f | 297 | #define IS_LTDC_REDVALUE(BRED) ((BRED) <= LTDC_COLOR) |
mbed_official | 235:685d5f11838f | 298 | /** |
mbed_official | 235:685d5f11838f | 299 | * @} |
mbed_official | 235:685d5f11838f | 300 | */ |
mbed_official | 235:685d5f11838f | 301 | |
mbed_official | 235:685d5f11838f | 302 | /** @defgroup LTDC_BlendingFactor1 |
mbed_official | 235:685d5f11838f | 303 | * @{ |
mbed_official | 235:685d5f11838f | 304 | */ |
mbed_official | 235:685d5f11838f | 305 | #define LTDC_BLENDING_FACTOR1_CA ((uint32_t)0x00000400) /*!< Blending factor : Cte Alpha */ |
mbed_official | 235:685d5f11838f | 306 | #define LTDC_BLENDING_FACTOR1_PAxCA ((uint32_t)0x00000600) /*!< Blending factor : Cte Alpha x Pixel Alpha*/ |
mbed_official | 235:685d5f11838f | 307 | |
mbed_official | 235:685d5f11838f | 308 | #define IS_LTDC_BLENDING_FACTOR1(BlendingFactor1) (((BlendingFactor1) == LTDC_BLENDING_FACTOR1_CA) || \ |
mbed_official | 235:685d5f11838f | 309 | ((BlendingFactor1) == LTDC_BLENDING_FACTOR1_PAxCA)) |
mbed_official | 235:685d5f11838f | 310 | /** |
mbed_official | 235:685d5f11838f | 311 | * @} |
mbed_official | 235:685d5f11838f | 312 | */ |
mbed_official | 235:685d5f11838f | 313 | |
mbed_official | 235:685d5f11838f | 314 | /** @defgroup LTDC_BlendingFactor2 |
mbed_official | 235:685d5f11838f | 315 | * @{ |
mbed_official | 235:685d5f11838f | 316 | */ |
mbed_official | 235:685d5f11838f | 317 | #define LTDC_BLENDING_FACTOR2_CA ((uint32_t)0x00000005) /*!< Blending factor : Cte Alpha */ |
mbed_official | 235:685d5f11838f | 318 | #define LTDC_BLENDING_FACTOR2_PAxCA ((uint32_t)0x00000007) /*!< Blending factor : Cte Alpha x Pixel Alpha*/ |
mbed_official | 235:685d5f11838f | 319 | |
mbed_official | 235:685d5f11838f | 320 | #define IS_LTDC_BLENDING_FACTOR2(BlendingFactor2) (((BlendingFactor2) == LTDC_BLENDING_FACTOR2_CA) || \ |
mbed_official | 235:685d5f11838f | 321 | ((BlendingFactor2) == LTDC_BLENDING_FACTOR2_PAxCA)) |
mbed_official | 235:685d5f11838f | 322 | /** |
mbed_official | 235:685d5f11838f | 323 | * @} |
mbed_official | 235:685d5f11838f | 324 | */ |
mbed_official | 235:685d5f11838f | 325 | |
mbed_official | 235:685d5f11838f | 326 | /** @defgroup LTDC_Pixelformat |
mbed_official | 235:685d5f11838f | 327 | * @{ |
mbed_official | 235:685d5f11838f | 328 | */ |
mbed_official | 235:685d5f11838f | 329 | #define LTDC_PIXEL_FORMAT_ARGB8888 ((uint32_t)0x00000000) /*!< ARGB8888 LTDC pixel format */ |
mbed_official | 235:685d5f11838f | 330 | #define LTDC_PIXEL_FORMAT_RGB888 ((uint32_t)0x00000001) /*!< RGB888 LTDC pixel format */ |
mbed_official | 235:685d5f11838f | 331 | #define LTDC_PIXEL_FORMAT_RGB565 ((uint32_t)0x00000002) /*!< RGB565 LTDC pixel format */ |
mbed_official | 235:685d5f11838f | 332 | #define LTDC_PIXEL_FORMAT_ARGB1555 ((uint32_t)0x00000003) /*!< ARGB1555 LTDC pixel format */ |
mbed_official | 235:685d5f11838f | 333 | #define LTDC_PIXEL_FORMAT_ARGB4444 ((uint32_t)0x00000004) /*!< ARGB4444 LTDC pixel format */ |
mbed_official | 235:685d5f11838f | 334 | #define LTDC_PIXEL_FORMAT_L8 ((uint32_t)0x00000005) /*!< L8 LTDC pixel format */ |
mbed_official | 235:685d5f11838f | 335 | #define LTDC_PIXEL_FORMAT_AL44 ((uint32_t)0x00000006) /*!< AL44 LTDC pixel format */ |
mbed_official | 235:685d5f11838f | 336 | #define LTDC_PIXEL_FORMAT_AL88 ((uint32_t)0x00000007) /*!< AL88 LTDC pixel format */ |
mbed_official | 235:685d5f11838f | 337 | |
mbed_official | 235:685d5f11838f | 338 | #define IS_LTDC_PIXEL_FORMAT(Pixelformat) (((Pixelformat) == LTDC_PIXEL_FORMAT_ARGB8888) || ((Pixelformat) == LTDC_PIXEL_FORMAT_RGB888) || \ |
mbed_official | 235:685d5f11838f | 339 | ((Pixelformat) == LTDC_PIXEL_FORMAT_RGB565) || ((Pixelformat) == LTDC_PIXEL_FORMAT_ARGB1555) || \ |
mbed_official | 235:685d5f11838f | 340 | ((Pixelformat) == LTDC_PIXEL_FORMAT_ARGB4444) || ((Pixelformat) == LTDC_PIXEL_FORMAT_L8) || \ |
mbed_official | 235:685d5f11838f | 341 | ((Pixelformat) == LTDC_PIXEL_FORMAT_AL44) || ((Pixelformat) == LTDC_PIXEL_FORMAT_AL88)) |
mbed_official | 235:685d5f11838f | 342 | /** |
mbed_official | 235:685d5f11838f | 343 | * @} |
mbed_official | 235:685d5f11838f | 344 | */ |
mbed_official | 235:685d5f11838f | 345 | |
mbed_official | 235:685d5f11838f | 346 | /** @defgroup LTDC_Alpha |
mbed_official | 235:685d5f11838f | 347 | * @{ |
mbed_official | 235:685d5f11838f | 348 | */ |
mbed_official | 235:685d5f11838f | 349 | #define LTDC_ALPHA LTDC_LxCACR_CONSTA /*!< LTDC Cte Alpha mask */ |
mbed_official | 235:685d5f11838f | 350 | |
mbed_official | 235:685d5f11838f | 351 | #define IS_LTDC_ALPHA(ALPHA) ((ALPHA) <= LTDC_ALPHA) |
mbed_official | 235:685d5f11838f | 352 | /** |
mbed_official | 235:685d5f11838f | 353 | * @} |
mbed_official | 235:685d5f11838f | 354 | */ |
mbed_official | 235:685d5f11838f | 355 | |
mbed_official | 235:685d5f11838f | 356 | /** @defgroup LTDC_LAYER_Config |
mbed_official | 235:685d5f11838f | 357 | * @{ |
mbed_official | 235:685d5f11838f | 358 | */ |
mbed_official | 235:685d5f11838f | 359 | #define LTDC_STOPPOSITION (LTDC_LxWHPCR_WHSPPOS >> 16) /*!< LTDC Layer stop position */ |
mbed_official | 235:685d5f11838f | 360 | #define LTDC_STARTPOSITION LTDC_LxWHPCR_WHSTPOS /*!< LTDC Layer start position */ |
mbed_official | 235:685d5f11838f | 361 | |
mbed_official | 235:685d5f11838f | 362 | #define LTDC_COLOR_FRAME_BUFFER LTDC_LxCFBLR_CFBLL /*!< LTDC Layer Line length */ |
mbed_official | 235:685d5f11838f | 363 | #define LTDC_LINE_NUMBER LTDC_LxCFBLNR_CFBLNBR /*!< LTDC Layer Line number */ |
mbed_official | 235:685d5f11838f | 364 | |
mbed_official | 235:685d5f11838f | 365 | #define IS_LTDC_HCONFIGST(HCONFIGST) ((HCONFIGST) <= LTDC_STARTPOSITION) |
mbed_official | 235:685d5f11838f | 366 | #define IS_LTDC_HCONFIGSP(HCONFIGSP) ((HCONFIGSP) <= LTDC_STOPPOSITION) |
mbed_official | 235:685d5f11838f | 367 | #define IS_LTDC_VCONFIGST(VCONFIGST) ((VCONFIGST) <= LTDC_STARTPOSITION) |
mbed_official | 235:685d5f11838f | 368 | #define IS_LTDC_VCONFIGSP(VCONFIGSP) ((VCONFIGSP) <= LTDC_STOPPOSITION) |
mbed_official | 235:685d5f11838f | 369 | |
mbed_official | 235:685d5f11838f | 370 | #define IS_LTDC_CFBP(CFBP) ((CFBP) <= LTDC_COLOR_FRAME_BUFFER) |
mbed_official | 235:685d5f11838f | 371 | #define IS_LTDC_CFBLL(CFBLL) ((CFBLL) <= LTDC_COLOR_FRAME_BUFFER) |
mbed_official | 235:685d5f11838f | 372 | |
mbed_official | 235:685d5f11838f | 373 | #define IS_LTDC_CFBLNBR(CFBLNBR) ((CFBLNBR) <= LTDC_LINE_NUMBER) |
mbed_official | 235:685d5f11838f | 374 | /** |
mbed_official | 235:685d5f11838f | 375 | * @} |
mbed_official | 235:685d5f11838f | 376 | */ |
mbed_official | 235:685d5f11838f | 377 | |
mbed_official | 235:685d5f11838f | 378 | /** @defgroup LTDC_LIPosition |
mbed_official | 235:685d5f11838f | 379 | * @{ |
mbed_official | 235:685d5f11838f | 380 | */ |
mbed_official | 235:685d5f11838f | 381 | #define IS_LTDC_LIPOS(LIPOS) ((LIPOS) <= 0x7FF) |
mbed_official | 235:685d5f11838f | 382 | /** |
mbed_official | 235:685d5f11838f | 383 | * @} |
mbed_official | 235:685d5f11838f | 384 | */ |
mbed_official | 235:685d5f11838f | 385 | |
mbed_official | 235:685d5f11838f | 386 | /** @defgroup LTDC_Interrupts |
mbed_official | 235:685d5f11838f | 387 | * @{ |
mbed_official | 235:685d5f11838f | 388 | */ |
mbed_official | 235:685d5f11838f | 389 | #define LTDC_IT_LI LTDC_IER_LIE |
mbed_official | 235:685d5f11838f | 390 | #define LTDC_IT_FU LTDC_IER_FUIE |
mbed_official | 235:685d5f11838f | 391 | #define LTDC_IT_TE LTDC_IER_TERRIE |
mbed_official | 235:685d5f11838f | 392 | #define LTDC_IT_RR LTDC_IER_RRIE |
mbed_official | 235:685d5f11838f | 393 | |
mbed_official | 235:685d5f11838f | 394 | #define IS_LTDC_IT(IT) ((((IT) & (uint32_t)0xFFFFFFF0) == 0x00) && ((IT) != 0x00)) |
mbed_official | 235:685d5f11838f | 395 | /** |
mbed_official | 235:685d5f11838f | 396 | * @} |
mbed_official | 235:685d5f11838f | 397 | */ |
mbed_official | 235:685d5f11838f | 398 | |
mbed_official | 235:685d5f11838f | 399 | /** @defgroup LTDC_Flag |
mbed_official | 235:685d5f11838f | 400 | * @{ |
mbed_official | 235:685d5f11838f | 401 | */ |
mbed_official | 235:685d5f11838f | 402 | #define LTDC_FLAG_LI LTDC_ISR_LIF |
mbed_official | 235:685d5f11838f | 403 | #define LTDC_FLAG_FU LTDC_ISR_FUIF |
mbed_official | 235:685d5f11838f | 404 | #define LTDC_FLAG_TE LTDC_ISR_TERRIF |
mbed_official | 235:685d5f11838f | 405 | #define LTDC_FLAG_RR LTDC_ISR_RRIF |
mbed_official | 235:685d5f11838f | 406 | |
mbed_official | 235:685d5f11838f | 407 | #define IS_LTDC_FLAG(FLAG) (((FLAG) == LTDC_FLAG_LI) || ((FLAG) == LTDC_FLAG_FU) || \ |
mbed_official | 235:685d5f11838f | 408 | ((FLAG) == LTDC_FLAG_TERR) || ((FLAG) == LTDC_FLAG_RR)) |
mbed_official | 235:685d5f11838f | 409 | /** |
mbed_official | 235:685d5f11838f | 410 | * @} |
mbed_official | 235:685d5f11838f | 411 | */ |
mbed_official | 235:685d5f11838f | 412 | |
mbed_official | 235:685d5f11838f | 413 | /** |
mbed_official | 235:685d5f11838f | 414 | * @} |
mbed_official | 235:685d5f11838f | 415 | */ |
mbed_official | 235:685d5f11838f | 416 | |
mbed_official | 235:685d5f11838f | 417 | /* Exported macro ------------------------------------------------------------*/ |
mbed_official | 235:685d5f11838f | 418 | |
mbed_official | 235:685d5f11838f | 419 | /** @brief Reset LTDC handle state |
mbed_official | 235:685d5f11838f | 420 | * @param __HANDLE__: specifies the LTDC handle. |
mbed_official | 235:685d5f11838f | 421 | * @retval None |
mbed_official | 235:685d5f11838f | 422 | */ |
mbed_official | 235:685d5f11838f | 423 | #define __HAL_LTDC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_LTDC_STATE_RESET) |
mbed_official | 235:685d5f11838f | 424 | |
mbed_official | 235:685d5f11838f | 425 | /** |
mbed_official | 235:685d5f11838f | 426 | * @brief Enable the LTDC. |
mbed_official | 235:685d5f11838f | 427 | * @param __HANDLE__: LTDC handle |
mbed_official | 235:685d5f11838f | 428 | * @retval None. |
mbed_official | 235:685d5f11838f | 429 | */ |
mbed_official | 235:685d5f11838f | 430 | #define __HAL_LTDC_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->GCR |= LTDC_GCR_LTDCEN) |
mbed_official | 235:685d5f11838f | 431 | |
mbed_official | 235:685d5f11838f | 432 | /** |
mbed_official | 235:685d5f11838f | 433 | * @brief Disable the LTDC. |
mbed_official | 235:685d5f11838f | 434 | * @param __HANDLE__: LTDC handle |
mbed_official | 235:685d5f11838f | 435 | * @retval None. |
mbed_official | 235:685d5f11838f | 436 | */ |
mbed_official | 235:685d5f11838f | 437 | #define __HAL_LTDC_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->GCR &= ~(LTDC_GCR_LTDCEN)) |
mbed_official | 235:685d5f11838f | 438 | |
mbed_official | 235:685d5f11838f | 439 | /** |
mbed_official | 235:685d5f11838f | 440 | * @brief Enable the LTDC Layer. |
mbed_official | 235:685d5f11838f | 441 | * @param __HANDLE__: LTDC handle |
mbed_official | 235:685d5f11838f | 442 | * @param __LAYER__: Specify the layer to be enabled |
mbed_official | 235:685d5f11838f | 443 | This parameter can be 0 or 1 |
mbed_official | 235:685d5f11838f | 444 | * @retval None. |
mbed_official | 235:685d5f11838f | 445 | */ |
mbed_official | 235:685d5f11838f | 446 | #define __HAL_LTDC_LAYER(__HANDLE__, __LAYER__) ((LTDC_Layer_TypeDef *)(((uint32_t)((__HANDLE__)->Instance)) + 0x84 + (0x80*(__LAYER__)))) |
mbed_official | 235:685d5f11838f | 447 | |
mbed_official | 235:685d5f11838f | 448 | #define __HAL_LTDC_LAYER_ENABLE(__HANDLE__, __LAYER__) ((__HAL_LTDC_LAYER((__HANDLE__), (__LAYER__)))->CR |= (uint32_t)LTDC_LxCR_LEN) |
mbed_official | 235:685d5f11838f | 449 | |
mbed_official | 235:685d5f11838f | 450 | /** |
mbed_official | 235:685d5f11838f | 451 | * @brief Disable the LTDC Layer. |
mbed_official | 235:685d5f11838f | 452 | * @param __HANDLE__: LTDC handle |
mbed_official | 235:685d5f11838f | 453 | * @param __LAYER__: Specify the layer to be disabled |
mbed_official | 235:685d5f11838f | 454 | This parameter can be 0 or 1 |
mbed_official | 235:685d5f11838f | 455 | * @retval None. |
mbed_official | 235:685d5f11838f | 456 | */ |
mbed_official | 235:685d5f11838f | 457 | #define __HAL_LTDC_LAYER_DISABLE(__HANDLE__, __LAYER__) ((__HAL_LTDC_LAYER((__HANDLE__), (__LAYER__)))->CR &= ~(uint32_t)LTDC_LxCR_LEN) |
mbed_official | 235:685d5f11838f | 458 | |
mbed_official | 235:685d5f11838f | 459 | /** |
mbed_official | 235:685d5f11838f | 460 | * @brief Reload Layer Configuration. |
mbed_official | 235:685d5f11838f | 461 | * @param __HANDLE__: LTDC handle |
mbed_official | 235:685d5f11838f | 462 | * @retval None. |
mbed_official | 235:685d5f11838f | 463 | */ |
mbed_official | 235:685d5f11838f | 464 | #define __HAL_LTDC_RELOAD_CONFIG(__HANDLE__) ((__HANDLE__)->Instance->SRCR |= LTDC_SRCR_IMR) |
mbed_official | 235:685d5f11838f | 465 | |
mbed_official | 235:685d5f11838f | 466 | /* Interrupt & Flag management */ |
mbed_official | 235:685d5f11838f | 467 | /** |
mbed_official | 235:685d5f11838f | 468 | * @brief Get the LTDC pending flags. |
mbed_official | 235:685d5f11838f | 469 | * @param __HANDLE__: LTDC handle |
mbed_official | 235:685d5f11838f | 470 | * @param __FLAG__: Get the specified flag. |
mbed_official | 235:685d5f11838f | 471 | * This parameter can be any combination of the following values: |
mbed_official | 235:685d5f11838f | 472 | * @arg LTDC_FLAG_LI: Line Interrupt flag |
mbed_official | 235:685d5f11838f | 473 | * @arg LTDC_FLAG_FU: FIFO Underrun Interrupt flag |
mbed_official | 235:685d5f11838f | 474 | * @arg LTDC_FLAG_TE: Transfer Error interrupt flag |
mbed_official | 235:685d5f11838f | 475 | * @arg LTDC_FLAG_RR: Register Reload Interrupt Flag |
mbed_official | 235:685d5f11838f | 476 | * @retval The state of FLAG (SET or RESET). |
mbed_official | 235:685d5f11838f | 477 | */ |
mbed_official | 235:685d5f11838f | 478 | #define __HAL_LTDC_GET_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR & (__FLAG__)) |
mbed_official | 235:685d5f11838f | 479 | |
mbed_official | 235:685d5f11838f | 480 | /** |
mbed_official | 235:685d5f11838f | 481 | * @brief Clears the LTDC pending flags. |
mbed_official | 235:685d5f11838f | 482 | * @param __HANDLE__: LTDC handle |
mbed_official | 235:685d5f11838f | 483 | * @param __FLAG__: specifies the flag to clear. |
mbed_official | 235:685d5f11838f | 484 | * This parameter can be any combination of the following values: |
mbed_official | 235:685d5f11838f | 485 | * @arg LTDC_FLAG_LI: Line Interrupt flag |
mbed_official | 235:685d5f11838f | 486 | * @arg LTDC_FLAG_FU: FIFO Underrun Interrupt flag |
mbed_official | 235:685d5f11838f | 487 | * @arg LTDC_FLAG_TE: Transfer Error interrupt flag |
mbed_official | 235:685d5f11838f | 488 | * @arg LTDC_FLAG_RR: Register Reload Interrupt Flag |
mbed_official | 235:685d5f11838f | 489 | * @retval None |
mbed_official | 235:685d5f11838f | 490 | */ |
mbed_official | 235:685d5f11838f | 491 | #define __HAL_LTDC_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = (__FLAG__)) |
mbed_official | 235:685d5f11838f | 492 | |
mbed_official | 235:685d5f11838f | 493 | /** |
mbed_official | 235:685d5f11838f | 494 | * @brief Enables the specified LTDC interrupts. |
mbed_official | 235:685d5f11838f | 495 | * @param __HANDLE__: LTDC handle |
mbed_official | 235:685d5f11838f | 496 | * @param __INTERRUPT__: specifies the LTDC interrupt sources to be enabled. |
mbed_official | 235:685d5f11838f | 497 | * This parameter can be any combination of the following values: |
mbed_official | 235:685d5f11838f | 498 | * @arg LTDC_IT_LI: Line Interrupt flag |
mbed_official | 235:685d5f11838f | 499 | * @arg LTDC_IT_FU: FIFO Underrun Interrupt flag |
mbed_official | 235:685d5f11838f | 500 | * @arg LTDC_IT_TE: Transfer Error interrupt flag |
mbed_official | 235:685d5f11838f | 501 | * @arg LTDC_IT_RR: Register Reload Interrupt Flag |
mbed_official | 235:685d5f11838f | 502 | * @retval None |
mbed_official | 235:685d5f11838f | 503 | */ |
mbed_official | 235:685d5f11838f | 504 | #define __HAL_LTDC_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER |= (__INTERRUPT__)) |
mbed_official | 235:685d5f11838f | 505 | |
mbed_official | 235:685d5f11838f | 506 | /** |
mbed_official | 235:685d5f11838f | 507 | * @brief Disables the specified LTDC interrupts. |
mbed_official | 235:685d5f11838f | 508 | * @param __HANDLE__: LTDC handle |
mbed_official | 235:685d5f11838f | 509 | * @param __INTERRUPT__: specifies the LTDC interrupt sources to be disabled. |
mbed_official | 235:685d5f11838f | 510 | * This parameter can be any combination of the following values: |
mbed_official | 235:685d5f11838f | 511 | * @arg LTDC_IT_LI: Line Interrupt flag |
mbed_official | 235:685d5f11838f | 512 | * @arg LTDC_IT_FU: FIFO Underrun Interrupt flag |
mbed_official | 235:685d5f11838f | 513 | * @arg LTDC_IT_TE: Transfer Error interrupt flag |
mbed_official | 235:685d5f11838f | 514 | * @arg LTDC_IT_RR: Register Reload Interrupt Flag |
mbed_official | 235:685d5f11838f | 515 | * @retval None |
mbed_official | 235:685d5f11838f | 516 | */ |
mbed_official | 235:685d5f11838f | 517 | #define __HAL_LTDC_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER &= ~(__INTERRUPT__)) |
mbed_official | 235:685d5f11838f | 518 | |
mbed_official | 235:685d5f11838f | 519 | /** |
mbed_official | 235:685d5f11838f | 520 | * @brief Checks whether the specified LTDC interrupt has occurred or not. |
mbed_official | 235:685d5f11838f | 521 | * @param __HANDLE__: LTDC handle |
mbed_official | 235:685d5f11838f | 522 | * @param __INTERRUPT__: specifies the LTDC interrupt source to check. |
mbed_official | 235:685d5f11838f | 523 | * This parameter can be one of the following values: |
mbed_official | 235:685d5f11838f | 524 | * @arg LTDC_IT_LI: Line Interrupt flag |
mbed_official | 235:685d5f11838f | 525 | * @arg LTDC_IT_FU: FIFO Underrun Interrupt flag |
mbed_official | 235:685d5f11838f | 526 | * @arg LTDC_IT_TE: Transfer Error interrupt flag |
mbed_official | 235:685d5f11838f | 527 | * @arg LTDC_IT_RR: Register Reload Interrupt Flag |
mbed_official | 235:685d5f11838f | 528 | * @retval The state of INTERRUPT (SET or RESET). |
mbed_official | 235:685d5f11838f | 529 | */ |
mbed_official | 235:685d5f11838f | 530 | #define __HAL_LTDC_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->ISR & (__INTERRUPT__)) |
mbed_official | 235:685d5f11838f | 531 | |
mbed_official | 235:685d5f11838f | 532 | /* Exported functions --------------------------------------------------------*/ |
mbed_official | 235:685d5f11838f | 533 | |
mbed_official | 235:685d5f11838f | 534 | /* Initialization and de-initialization functions *****************************/ |
mbed_official | 235:685d5f11838f | 535 | HAL_StatusTypeDef HAL_LTDC_Init(LTDC_HandleTypeDef *hltdc); |
mbed_official | 235:685d5f11838f | 536 | HAL_StatusTypeDef HAL_LTDC_DeInit(LTDC_HandleTypeDef *hltdc); |
mbed_official | 235:685d5f11838f | 537 | void HAL_LTDC_MspInit(LTDC_HandleTypeDef* hltdc); |
mbed_official | 235:685d5f11838f | 538 | void HAL_LTDC_MspDeInit(LTDC_HandleTypeDef* hltdc); |
mbed_official | 235:685d5f11838f | 539 | void HAL_LTDC_ErrorCallback(LTDC_HandleTypeDef *hltdc); |
mbed_official | 235:685d5f11838f | 540 | void HAL_LTDC_LineEvenCallback(LTDC_HandleTypeDef *hltdc); |
mbed_official | 235:685d5f11838f | 541 | |
mbed_official | 235:685d5f11838f | 542 | /* IO operation functions *****************************************************/ |
mbed_official | 235:685d5f11838f | 543 | void HAL_LTDC_IRQHandler(LTDC_HandleTypeDef *hltdc); |
mbed_official | 235:685d5f11838f | 544 | |
mbed_official | 235:685d5f11838f | 545 | /* Peripheral Control functions ***********************************************/ |
mbed_official | 235:685d5f11838f | 546 | HAL_StatusTypeDef HAL_LTDC_ConfigLayer(LTDC_HandleTypeDef *hltdc, LTDC_LayerCfgTypeDef *pLayerCfg, uint32_t LayerIdx); |
mbed_official | 235:685d5f11838f | 547 | HAL_StatusTypeDef HAL_LTDC_SetWindowSize(LTDC_HandleTypeDef *hltdc, uint32_t XSize, uint32_t YSize, uint32_t LayerIdx); |
mbed_official | 235:685d5f11838f | 548 | HAL_StatusTypeDef HAL_LTDC_SetWindowPosition(LTDC_HandleTypeDef *hltdc, uint32_t X0, uint32_t Y0, uint32_t LayerIdx); |
mbed_official | 235:685d5f11838f | 549 | HAL_StatusTypeDef HAL_LTDC_SetPixelFormat(LTDC_HandleTypeDef *hltdc, uint32_t Pixelformat, uint32_t LayerIdx); |
mbed_official | 235:685d5f11838f | 550 | HAL_StatusTypeDef HAL_LTDC_SetAlpha(LTDC_HandleTypeDef *hltdc, uint32_t Alpha, uint32_t LayerIdx); |
mbed_official | 235:685d5f11838f | 551 | HAL_StatusTypeDef HAL_LTDC_SetAddress(LTDC_HandleTypeDef *hltdc, uint32_t Address, uint32_t LayerIdx); |
mbed_official | 235:685d5f11838f | 552 | HAL_StatusTypeDef HAL_LTDC_ConfigColorKeying(LTDC_HandleTypeDef *hltdc, uint32_t RGBValue, uint32_t LayerIdx); |
mbed_official | 235:685d5f11838f | 553 | HAL_StatusTypeDef HAL_LTDC_ConfigCLUT(LTDC_HandleTypeDef *hltdc, uint32_t *pCLUT, uint32_t CLUTSize, uint32_t LayerIdx); |
mbed_official | 235:685d5f11838f | 554 | HAL_StatusTypeDef HAL_LTDC_EnableColorKeying(LTDC_HandleTypeDef *hltdc, uint32_t LayerIdx); |
mbed_official | 235:685d5f11838f | 555 | HAL_StatusTypeDef HAL_LTDC_DisableColorKeying(LTDC_HandleTypeDef *hltdc, uint32_t LayerIdx); |
mbed_official | 235:685d5f11838f | 556 | HAL_StatusTypeDef HAL_LTDC_EnableCLUT(LTDC_HandleTypeDef *hltdc, uint32_t LayerIdx); |
mbed_official | 235:685d5f11838f | 557 | HAL_StatusTypeDef HAL_LTDC_DisableCLUT(LTDC_HandleTypeDef *hltdc, uint32_t LayerIdx); |
mbed_official | 235:685d5f11838f | 558 | HAL_StatusTypeDef HAL_LTDC_ProgramLineEvent(LTDC_HandleTypeDef *hltdc, uint32_t Line); |
mbed_official | 235:685d5f11838f | 559 | HAL_StatusTypeDef HAL_LTDC_EnableDither(LTDC_HandleTypeDef *hltdc); |
mbed_official | 235:685d5f11838f | 560 | HAL_StatusTypeDef HAL_LTDC_DisableDither(LTDC_HandleTypeDef *hltdc); |
mbed_official | 235:685d5f11838f | 561 | |
mbed_official | 235:685d5f11838f | 562 | /* Peripheral State functions *************************************************/ |
mbed_official | 235:685d5f11838f | 563 | HAL_LTDC_StateTypeDef HAL_LTDC_GetState(LTDC_HandleTypeDef *hltdc); |
mbed_official | 235:685d5f11838f | 564 | uint32_t HAL_LTDC_GetError(LTDC_HandleTypeDef *hltdc); |
mbed_official | 235:685d5f11838f | 565 | |
mbed_official | 235:685d5f11838f | 566 | #endif /* STM32F429xx || STM32F439xx */ |
mbed_official | 235:685d5f11838f | 567 | |
mbed_official | 235:685d5f11838f | 568 | /** |
mbed_official | 235:685d5f11838f | 569 | * @} |
mbed_official | 235:685d5f11838f | 570 | */ |
mbed_official | 235:685d5f11838f | 571 | |
mbed_official | 235:685d5f11838f | 572 | /** |
mbed_official | 235:685d5f11838f | 573 | * @} |
mbed_official | 235:685d5f11838f | 574 | */ |
mbed_official | 235:685d5f11838f | 575 | |
mbed_official | 235:685d5f11838f | 576 | #ifdef __cplusplus |
mbed_official | 235:685d5f11838f | 577 | } |
mbed_official | 235:685d5f11838f | 578 | #endif |
mbed_official | 235:685d5f11838f | 579 | |
mbed_official | 235:685d5f11838f | 580 | #endif /* __STM32F4xx_HAL_LTDC_H */ |
mbed_official | 235:685d5f11838f | 581 | |
mbed_official | 235:685d5f11838f | 582 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |