A simple 128x32 graphical LCD program to quickstart with LCD on ARM mbed IoT Starter Kit. This requires mbed Applciation Shield with FRDM-K64F platform.

Dependencies:   C12832

Committer:
tushki7
Date:
Sun Apr 12 15:45:52 2015 +0000
Revision:
1:eb68c94a8ee5
Parent:
0:60d829a0353a
A simple 128x32 LCD program with ARM mbed IoT Starter Kit;

Who changed what in which revision?

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