Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
elijahorr
Date:
Thu Apr 14 07:28:54 2016 +0000
Revision:
121:672067c3ada4
Parent:
112:6f327212ef96
.

Who changed what in which revision?

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