The official mbed C/C SDK provides the software platform and libraries to build your applications.

Fork of mbed by mbed official

Committer:
bogdanm
Date:
Wed Jun 11 15:14:05 2014 +0100
Revision:
85:024bf7f99721
Parent:
81:7d30d6019079
Child:
90:cb3d968589d8
Release 85 of the mbed library

Main changes:

- K64F Ethernet fixes
- Updated tests
- Fixes for various mbed targets
- Code cleanup: fixed warnings, more consistent code style
- GCC support for K64F

There is a known issue with the I2C interface on some ST targets. If you
find the I2C interface problematic on your ST board, please log a bug
against this on mbed.org.

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