Initial commit

Dependencies:   FastPWM

Committer:
lypinator
Date:
Wed Sep 16 01:11:49 2020 +0000
Revision:
0:bb348c97df44
Added PWM

Who changed what in which revision?

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