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

Fork of mbed by mbed official

Committer:
Kojto
Date:
Tue Feb 03 15:31:20 2015 +0000
Revision:
93:e188a91d3eaa
Release 93 of the mbed library

Main changes:

- Renesas RZ_A1H bugfixes - i2c, ticker
- new targets - Nucleo F303RE, Nucleo F070RB, BLE SMURFS,
Dragonfly 411RE,
- BusXXX - is connected method, plus operators addition
- LPC8xx - I2c fixes
- timestamp_t reverted to uint32_t
- RTX - fixes regarding stack (alignment, magic word)

Who changed what in which revision?

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