version_2.0

Dependents:   cc3000_ping_demo_try_2

Fork of mbed by mbed official

Committer:
emilmont
Date:
Fri Feb 14 14:36:43 2014 +0000
Revision:
77:869cf507173a
Child:
81:7d30d6019079
Release 77 of the mbed library

Main changes:
* Add target NUCLEO_F030R8
* Add target NUCLEO_F401RE
* Add target NUCLEO_F103RB
* Add target NUCLEO_L152RE

Who changed what in which revision?

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