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