mbed library sources

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Thu Aug 20 10:45:13 2015 +0100
Revision:
613:bc40b8d2aec4
Parent:
532:fe11edbda85c
Synchronized with git revision 92ca8c7b60a283b6bb60eb65b183dac1599f0ade

Full URL: https://github.com/mbedmicro/mbed/commit/92ca8c7b60a283b6bb60eb65b183dac1599f0ade/

Nordic: update application start address in GCC linker script

Who changed what in which revision?

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