2 ******************************************************************************
3 * @file stm32f7xx_hal_ltdc.h
4 * @author MCD Application Team
7 * @brief Header file of LTDC HAL module.
8 ******************************************************************************
11 * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
13 * Redistribution and use in source and binary forms, with or without modification,
14 * are permitted provided that the following conditions are met:
15 * 1. Redistributions of source code must retain the above copyright notice,
16 * this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright notice,
18 * this list of conditions and the following disclaimer in the documentation
19 * and/or other materials provided with the distribution.
20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
21 * may be used to endorse or promote products derived from this software
22 * without specific prior written permission.
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 ******************************************************************************
38 /* Define to prevent recursive inclusion -------------------------------------*/
39 #ifndef __STM32F7xx_HAL_LTDC_H
40 #define __STM32F7xx_HAL_LTDC_H
46 #if defined (STM32F746xx) || defined (STM32F756xx) || defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx) || defined (STM32F779xx)
48 /* Includes ------------------------------------------------------------------*/
49 #include "stm32f7xx_hal_def.h"
52 /** @addtogroup STM32F7xx_HAL_Driver
56 /** @defgroup LTDC LTDC
57 * @brief LTDC HAL module driver
61 /* Exported types ------------------------------------------------------------*/
62 /** @defgroup LTDC_Exported_Types LTDC Exported Types
68 * @brief LTDC color structure definition
72 uint8_t Blue
; /*!< Configures the blue value.
73 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */
75 uint8_t Green
; /*!< Configures the green value.
76 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */
78 uint8_t Red
; /*!< Configures the red value.
79 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */
81 uint8_t Reserved
; /*!< Reserved 0xFF */
85 * @brief LTDC Init structure definition
89 uint32_t HSPolarity
; /*!< configures the horizontal synchronization polarity.
90 This parameter can be one value of @ref LTDC_HS_POLARITY */
92 uint32_t VSPolarity
; /*!< configures the vertical synchronization polarity.
93 This parameter can be one value of @ref LTDC_VS_POLARITY */
95 uint32_t DEPolarity
; /*!< configures the data enable polarity.
96 This parameter can be one of value of @ref LTDC_DE_POLARITY */
98 uint32_t PCPolarity
; /*!< configures the pixel clock polarity.
99 This parameter can be one of value of @ref LTDC_PC_POLARITY */
101 uint32_t HorizontalSync
; /*!< configures the number of Horizontal synchronization width.
102 This parameter must be a number between Min_Data = 0x000 and Max_Data = 0xFFF. */
104 uint32_t VerticalSync
; /*!< configures the number of Vertical synchronization height.
105 This parameter must be a number between Min_Data = 0x000 and Max_Data = 0x7FF. */
107 uint32_t AccumulatedHBP
; /*!< configures the accumulated horizontal back porch width.
108 This parameter must be a number between Min_Data = LTDC_HorizontalSync and Max_Data = 0xFFF. */
110 uint32_t AccumulatedVBP
; /*!< configures the accumulated vertical back porch height.
111 This parameter must be a number between Min_Data = LTDC_VerticalSync and Max_Data = 0x7FF. */
113 uint32_t AccumulatedActiveW
; /*!< configures the accumulated active width.
114 This parameter must be a number between Min_Data = LTDC_AccumulatedHBP and Max_Data = 0xFFF. */
116 uint32_t AccumulatedActiveH
; /*!< configures the accumulated active height.
117 This parameter must be a number between Min_Data = LTDC_AccumulatedVBP and Max_Data = 0x7FF. */
119 uint32_t TotalWidth
; /*!< configures the total width.
120 This parameter must be a number between Min_Data = LTDC_AccumulatedActiveW and Max_Data = 0xFFF. */
122 uint32_t TotalHeigh
; /*!< configures the total height.
123 This parameter must be a number between Min_Data = LTDC_AccumulatedActiveH and Max_Data = 0x7FF. */
125 LTDC_ColorTypeDef Backcolor
; /*!< Configures the background color. */
129 * @brief LTDC Layer structure definition
133 uint32_t WindowX0
; /*!< Configures the Window Horizontal Start Position.
134 This parameter must be a number between Min_Data = 0x000 and Max_Data = 0xFFF. */
136 uint32_t WindowX1
; /*!< Configures the Window Horizontal Stop Position.
137 This parameter must be a number between Min_Data = 0x000 and Max_Data = 0xFFF. */
139 uint32_t WindowY0
; /*!< Configures the Window vertical Start Position.
140 This parameter must be a number between Min_Data = 0x000 and Max_Data = 0x7FF. */
142 uint32_t WindowY1
; /*!< Configures the Window vertical Stop Position.
143 This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0x7FF. */
145 uint32_t PixelFormat
; /*!< Specifies the pixel format.
146 This parameter can be one of value of @ref LTDC_Pixelformat */
148 uint32_t Alpha
; /*!< Specifies the constant alpha used for blending.
149 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */
151 uint32_t Alpha0
; /*!< Configures the default alpha value.
152 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */
154 uint32_t BlendingFactor1
; /*!< Select the blending factor 1.
155 This parameter can be one of value of @ref LTDC_BlendingFactor1 */
157 uint32_t BlendingFactor2
; /*!< Select the blending factor 2.
158 This parameter can be one of value of @ref LTDC_BlendingFactor2 */
160 uint32_t FBStartAdress
; /*!< Configures the color frame buffer address */
162 uint32_t ImageWidth
; /*!< Configures the color frame buffer line length.
163 This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0x1FFF. */
165 uint32_t ImageHeight
; /*!< Specifies the number of line in frame buffer.
166 This parameter must be a number between Min_Data = 0x000 and Max_Data = 0x7FF. */
168 LTDC_ColorTypeDef Backcolor
; /*!< Configures the layer background color. */
169 } LTDC_LayerCfgTypeDef
;
172 * @brief HAL LTDC State structures definition
176 HAL_LTDC_STATE_RESET
= 0x00U
, /*!< LTDC not yet initialized or disabled */
177 HAL_LTDC_STATE_READY
= 0x01U
, /*!< LTDC initialized and ready for use */
178 HAL_LTDC_STATE_BUSY
= 0x02U
, /*!< LTDC internal process is ongoing */
179 HAL_LTDC_STATE_TIMEOUT
= 0x03U
, /*!< LTDC Timeout state */
180 HAL_LTDC_STATE_ERROR
= 0x04U
/*!< LTDC state error */
181 }HAL_LTDC_StateTypeDef
;
184 * @brief LTDC handle Structure definition
188 LTDC_TypeDef
*Instance
; /*!< LTDC Register base address */
190 LTDC_InitTypeDef Init
; /*!< LTDC parameters */
192 LTDC_LayerCfgTypeDef LayerCfg
[MAX_LAYER
]; /*!< LTDC Layers parameters */
194 HAL_LockTypeDef Lock
; /*!< LTDC Lock */
196 __IO HAL_LTDC_StateTypeDef State
; /*!< LTDC state */
198 __IO
uint32_t ErrorCode
; /*!< LTDC Error code */
200 } LTDC_HandleTypeDef
;
205 /* Exported constants --------------------------------------------------------*/
206 /** @defgroup LTDC_Exported_Constants LTDC Exported Constants
210 /** @defgroup LTDC_Error_Code LTDC Error Code
213 #define HAL_LTDC_ERROR_NONE ((uint32_t)0x00000000U) /*!< LTDC No error */
214 #define HAL_LTDC_ERROR_TE ((uint32_t)0x00000001U) /*!< LTDC Transfer error */
215 #define HAL_LTDC_ERROR_FU ((uint32_t)0x00000002U) /*!< LTDC FIFO Underrun */
216 #define HAL_LTDC_ERROR_TIMEOUT ((uint32_t)0x00000020U) /*!< LTDC Timeout error */
221 /** @defgroup LTDC_HS_POLARITY LTDC HS POLARITY
224 #define LTDC_HSPOLARITY_AL ((uint32_t)0x00000000U) /*!< Horizontal Synchronization is active low. */
225 #define LTDC_HSPOLARITY_AH LTDC_GCR_HSPOL /*!< Horizontal Synchronization is active high. */
230 /** @defgroup LTDC_VS_POLARITY LTDC VS POLARITY
233 #define LTDC_VSPOLARITY_AL ((uint32_t)0x00000000U) /*!< Vertical Synchronization is active low. */
234 #define LTDC_VSPOLARITY_AH LTDC_GCR_VSPOL /*!< Vertical Synchronization is active high. */
239 /** @defgroup LTDC_DE_POLARITY LTDC DE POLARITY
242 #define LTDC_DEPOLARITY_AL ((uint32_t)0x00000000U) /*!< Data Enable, is active low. */
243 #define LTDC_DEPOLARITY_AH LTDC_GCR_DEPOL /*!< Data Enable, is active high. */
248 /** @defgroup LTDC_PC_POLARITY LTDC PC POLARITY
251 #define LTDC_PCPOLARITY_IPC ((uint32_t)0x00000000U) /*!< input pixel clock. */
252 #define LTDC_PCPOLARITY_IIPC LTDC_GCR_PCPOL /*!< inverted input pixel clock. */
257 /** @defgroup LTDC_SYNC LTDC SYNC
260 #define LTDC_HORIZONTALSYNC (LTDC_SSCR_HSW >> 16) /*!< Horizontal synchronization width. */
261 #define LTDC_VERTICALSYNC LTDC_SSCR_VSH /*!< Vertical synchronization height. */
266 /** @defgroup LTDC_BACK_COLOR LTDC BACK COLOR
269 #define LTDC_COLOR ((uint32_t)0x000000FFU) /*!< Color mask */
274 /** @defgroup LTDC_BlendingFactor1 LTDC Blending Factor1
277 #define LTDC_BLENDING_FACTOR1_CA ((uint32_t)0x00000400U) /*!< Blending factor : Cte Alpha */
278 #define LTDC_BLENDING_FACTOR1_PAxCA ((uint32_t)0x00000600U) /*!< Blending factor : Cte Alpha x Pixel Alpha*/
283 /** @defgroup LTDC_BlendingFactor2 LTDC Blending Factor2
286 #define LTDC_BLENDING_FACTOR2_CA ((uint32_t)0x00000005U) /*!< Blending factor : Cte Alpha */
287 #define LTDC_BLENDING_FACTOR2_PAxCA ((uint32_t)0x00000007U) /*!< Blending factor : Cte Alpha x Pixel Alpha*/
292 /** @defgroup LTDC_Pixelformat LTDC Pixel format
295 #define LTDC_PIXEL_FORMAT_ARGB8888 ((uint32_t)0x00000000U) /*!< ARGB8888 LTDC pixel format */
296 #define LTDC_PIXEL_FORMAT_RGB888 ((uint32_t)0x00000001U) /*!< RGB888 LTDC pixel format */
297 #define LTDC_PIXEL_FORMAT_RGB565 ((uint32_t)0x00000002U) /*!< RGB565 LTDC pixel format */
298 #define LTDC_PIXEL_FORMAT_ARGB1555 ((uint32_t)0x00000003U) /*!< ARGB1555 LTDC pixel format */
299 #define LTDC_PIXEL_FORMAT_ARGB4444 ((uint32_t)0x00000004U) /*!< ARGB4444 LTDC pixel format */
300 #define LTDC_PIXEL_FORMAT_L8 ((uint32_t)0x00000005U) /*!< L8 LTDC pixel format */
301 #define LTDC_PIXEL_FORMAT_AL44 ((uint32_t)0x00000006U) /*!< AL44 LTDC pixel format */
302 #define LTDC_PIXEL_FORMAT_AL88 ((uint32_t)0x00000007U) /*!< AL88 LTDC pixel format */
307 /** @defgroup LTDC_Alpha LTDC Alpha
310 #define LTDC_ALPHA LTDC_LxCACR_CONSTA /*!< LTDC Cte Alpha mask */
315 /** @defgroup LTDC_LAYER_Config LTDC LAYER Config
318 #define LTDC_STOPPOSITION (LTDC_LxWHPCR_WHSPPOS >> 16) /*!< LTDC Layer stop position */
319 #define LTDC_STARTPOSITION LTDC_LxWHPCR_WHSTPOS /*!< LTDC Layer start position */
321 #define LTDC_COLOR_FRAME_BUFFER LTDC_LxCFBLR_CFBLL /*!< LTDC Layer Line length */
322 #define LTDC_LINE_NUMBER LTDC_LxCFBLNR_CFBLNBR /*!< LTDC Layer Line number */
327 /** @defgroup LTDC_Interrupts LTDC Interrupts
330 #define LTDC_IT_LI LTDC_IER_LIE
331 #define LTDC_IT_FU LTDC_IER_FUIE
332 #define LTDC_IT_TE LTDC_IER_TERRIE
333 #define LTDC_IT_RR LTDC_IER_RRIE
338 /** @defgroup LTDC_Flag LTDC Flag
341 #define LTDC_FLAG_LI LTDC_ISR_LIF
342 #define LTDC_FLAG_FU LTDC_ISR_FUIF
343 #define LTDC_FLAG_TE LTDC_ISR_TERRIF
344 #define LTDC_FLAG_RR LTDC_ISR_RRIF
349 /** @defgroup LTDC_Reload_Type LTDC Reload Type
352 #define LTDC_RELOAD_IMMEDIATE LTDC_SRCR_IMR /*!< Immediate Reload */
353 #define LTDC_RELOAD_VERTICAL_BLANKING LTDC_SRCR_VBR /*!< Vertical Blanking Reload */
362 /* Exported macro ------------------------------------------------------------*/
363 /** @defgroup LTDC_Exported_Macros LTDC Exported Macros
367 /** @brief Reset LTDC handle state
368 * @param __HANDLE__: specifies the LTDC handle.
371 #define __HAL_LTDC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_LTDC_STATE_RESET)
374 * @brief Enable the LTDC.
375 * @param __HANDLE__: LTDC handle
378 #define __HAL_LTDC_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->GCR |= LTDC_GCR_LTDCEN)
381 * @brief Disable the LTDC.
382 * @param __HANDLE__: LTDC handle
385 #define __HAL_LTDC_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->GCR &= ~(LTDC_GCR_LTDCEN))
388 * @brief Enable the LTDC Layer.
389 * @param __HANDLE__: LTDC handle
390 * @param __LAYER__: Specify the layer to be enabled
391 * This parameter can be 0 or 1
394 #define __HAL_LTDC_LAYER_ENABLE(__HANDLE__, __LAYER__) ((LTDC_LAYER((__HANDLE__), (__LAYER__)))->CR |= (uint32_t)LTDC_LxCR_LEN)
397 * @brief Disable the LTDC Layer.
398 * @param __HANDLE__: LTDC handle
399 * @param __LAYER__: Specify the layer to be disabled
400 * This parameter can be 0 or 1
403 #define __HAL_LTDC_LAYER_DISABLE(__HANDLE__, __LAYER__) ((LTDC_LAYER((__HANDLE__), (__LAYER__)))->CR &= ~(uint32_t)LTDC_LxCR_LEN)
406 * @brief Reload Layer Configuration.
407 * @param __HANDLE__: LTDC handle
410 #define __HAL_LTDC_RELOAD_CONFIG(__HANDLE__) ((__HANDLE__)->Instance->SRCR |= LTDC_SRCR_IMR)
412 /* Interrupt & Flag management */
414 * @brief Get the LTDC pending flags.
415 * @param __HANDLE__: LTDC handle
416 * @param __FLAG__: Get the specified flag.
417 * This parameter can be any combination of the following values:
418 * @arg LTDC_FLAG_LI: Line Interrupt flag
419 * @arg LTDC_FLAG_FU: FIFO Underrun Interrupt flag
420 * @arg LTDC_FLAG_TE: Transfer Error interrupt flag
421 * @arg LTDC_FLAG_RR: Register Reload Interrupt Flag
422 * @retval The state of FLAG (SET or RESET).
424 #define __HAL_LTDC_GET_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR & (__FLAG__))
427 * @brief Clears the LTDC pending flags.
428 * @param __HANDLE__: LTDC handle
429 * @param __FLAG__: specifies the flag to clear.
430 * This parameter can be any combination of the following values:
431 * @arg LTDC_FLAG_LI: Line Interrupt flag
432 * @arg LTDC_FLAG_FU: FIFO Underrun Interrupt flag
433 * @arg LTDC_FLAG_TE: Transfer Error interrupt flag
434 * @arg LTDC_FLAG_RR: Register Reload Interrupt Flag
437 #define __HAL_LTDC_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = (__FLAG__))
440 * @brief Enables the specified LTDC interrupts.
441 * @param __HANDLE__: LTDC handle
442 * @param __INTERRUPT__: specifies the LTDC interrupt sources to be enabled.
443 * This parameter can be any combination of the following values:
444 * @arg LTDC_IT_LI: Line Interrupt flag
445 * @arg LTDC_IT_FU: FIFO Underrun Interrupt flag
446 * @arg LTDC_IT_TE: Transfer Error interrupt flag
447 * @arg LTDC_IT_RR: Register Reload Interrupt Flag
450 #define __HAL_LTDC_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER |= (__INTERRUPT__))
453 * @brief Disables the specified LTDC interrupts.
454 * @param __HANDLE__: LTDC handle
455 * @param __INTERRUPT__: specifies the LTDC interrupt sources to be disabled.
456 * This parameter can be any combination of the following values:
457 * @arg LTDC_IT_LI: Line Interrupt flag
458 * @arg LTDC_IT_FU: FIFO Underrun Interrupt flag
459 * @arg LTDC_IT_TE: Transfer Error interrupt flag
460 * @arg LTDC_IT_RR: Register Reload Interrupt Flag
463 #define __HAL_LTDC_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER &= ~(__INTERRUPT__))
466 * @brief Checks whether the specified LTDC interrupt has occurred or not.
467 * @param __HANDLE__: LTDC handle
468 * @param __INTERRUPT__: specifies the LTDC interrupt source to check.
469 * This parameter can be one of the following values:
470 * @arg LTDC_IT_LI: Line Interrupt flag
471 * @arg LTDC_IT_FU: FIFO Underrun Interrupt flag
472 * @arg LTDC_IT_TE: Transfer Error interrupt flag
473 * @arg LTDC_IT_RR: Register Reload Interrupt Flag
474 * @retval The state of INTERRUPT (SET or RESET).
476 #define __HAL_LTDC_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->ISR & (__INTERRUPT__))
481 #if defined (STM32F769xx) || defined (STM32F779xx)
482 /* Include LTDC HAL Extension module */
483 #include "stm32f7xx_hal_ltdc_ex.h"
484 #endif /* STM32F769xx) | STM32F779xx */
486 /* Exported functions --------------------------------------------------------*/
487 /** @addtogroup LTDC_Exported_Functions
490 /** @addtogroup LTDC_Exported_Functions_Group1
493 /* Initialization and de-initialization functions *****************************/
494 HAL_StatusTypeDef
HAL_LTDC_Init(LTDC_HandleTypeDef
*hltdc
);
495 HAL_StatusTypeDef
HAL_LTDC_DeInit(LTDC_HandleTypeDef
*hltdc
);
496 void HAL_LTDC_MspInit(LTDC_HandleTypeDef
* hltdc
);
497 void HAL_LTDC_MspDeInit(LTDC_HandleTypeDef
* hltdc
);
498 void HAL_LTDC_ErrorCallback(LTDC_HandleTypeDef
*hltdc
);
499 void HAL_LTDC_LineEvenCallback(LTDC_HandleTypeDef
*hltdc
);
500 void HAL_LTDC_ReloadEventCallback(LTDC_HandleTypeDef
*hltdc
);
505 /** @addtogroup LTDC_Exported_Functions_Group2
508 /* IO operation functions *****************************************************/
509 void HAL_LTDC_IRQHandler(LTDC_HandleTypeDef
*hltdc
);
514 /** @addtogroup LTDC_Exported_Functions_Group3
517 /* Peripheral Control functions ***********************************************/
518 HAL_StatusTypeDef
HAL_LTDC_ConfigLayer(LTDC_HandleTypeDef
*hltdc
, LTDC_LayerCfgTypeDef
*pLayerCfg
, uint32_t LayerIdx
);
519 HAL_StatusTypeDef
HAL_LTDC_SetWindowSize(LTDC_HandleTypeDef
*hltdc
, uint32_t XSize
, uint32_t YSize
, uint32_t LayerIdx
);
520 HAL_StatusTypeDef
HAL_LTDC_SetWindowPosition(LTDC_HandleTypeDef
*hltdc
, uint32_t X0
, uint32_t Y0
, uint32_t LayerIdx
);
521 HAL_StatusTypeDef
HAL_LTDC_SetPixelFormat(LTDC_HandleTypeDef
*hltdc
, uint32_t Pixelformat
, uint32_t LayerIdx
);
522 HAL_StatusTypeDef
HAL_LTDC_SetAlpha(LTDC_HandleTypeDef
*hltdc
, uint32_t Alpha
, uint32_t LayerIdx
);
523 HAL_StatusTypeDef
HAL_LTDC_SetAddress(LTDC_HandleTypeDef
*hltdc
, uint32_t Address
, uint32_t LayerIdx
);
524 HAL_StatusTypeDef
HAL_LTDC_SetPitch(LTDC_HandleTypeDef
*hltdc
, uint32_t LinePitchInPixels
, uint32_t LayerIdx
);
525 HAL_StatusTypeDef
HAL_LTDC_ConfigColorKeying(LTDC_HandleTypeDef
*hltdc
, uint32_t RGBValue
, uint32_t LayerIdx
);
526 HAL_StatusTypeDef
HAL_LTDC_ConfigCLUT(LTDC_HandleTypeDef
*hltdc
, uint32_t *pCLUT
, uint32_t CLUTSize
, uint32_t LayerIdx
);
527 HAL_StatusTypeDef
HAL_LTDC_EnableColorKeying(LTDC_HandleTypeDef
*hltdc
, uint32_t LayerIdx
);
528 HAL_StatusTypeDef
HAL_LTDC_DisableColorKeying(LTDC_HandleTypeDef
*hltdc
, uint32_t LayerIdx
);
529 HAL_StatusTypeDef
HAL_LTDC_EnableCLUT(LTDC_HandleTypeDef
*hltdc
, uint32_t LayerIdx
);
530 HAL_StatusTypeDef
HAL_LTDC_DisableCLUT(LTDC_HandleTypeDef
*hltdc
, uint32_t LayerIdx
);
531 HAL_StatusTypeDef
HAL_LTDC_ProgramLineEvent(LTDC_HandleTypeDef
*hltdc
, uint32_t Line
);
532 HAL_StatusTypeDef
HAL_LTDC_EnableDither(LTDC_HandleTypeDef
*hltdc
);
533 HAL_StatusTypeDef
HAL_LTDC_DisableDither(LTDC_HandleTypeDef
*hltdc
);
534 HAL_StatusTypeDef
HAL_LTDC_Reload(LTDC_HandleTypeDef
*hltdc
, uint32_t ReloadType
);
535 HAL_StatusTypeDef
HAL_LTDC_ConfigLayer_NoReload(LTDC_HandleTypeDef
*hltdc
, LTDC_LayerCfgTypeDef
*pLayerCfg
, uint32_t LayerIdx
);
536 HAL_StatusTypeDef
HAL_LTDC_SetWindowSize_NoReload(LTDC_HandleTypeDef
*hltdc
, uint32_t XSize
, uint32_t YSize
, uint32_t LayerIdx
);
537 HAL_StatusTypeDef
HAL_LTDC_SetWindowPosition_NoReload(LTDC_HandleTypeDef
*hltdc
, uint32_t X0
, uint32_t Y0
, uint32_t LayerIdx
);
538 HAL_StatusTypeDef
HAL_LTDC_SetPixelFormat_NoReload(LTDC_HandleTypeDef
*hltdc
, uint32_t Pixelformat
, uint32_t LayerIdx
);
539 HAL_StatusTypeDef
HAL_LTDC_SetAlpha_NoReload(LTDC_HandleTypeDef
*hltdc
, uint32_t Alpha
, uint32_t LayerIdx
);
540 HAL_StatusTypeDef
HAL_LTDC_SetAddress_NoReload(LTDC_HandleTypeDef
*hltdc
, uint32_t Address
, uint32_t LayerIdx
);
541 HAL_StatusTypeDef
HAL_LTDC_SetPitch_NoReload(LTDC_HandleTypeDef
*hltdc
, uint32_t LinePitchInPixels
, uint32_t LayerIdx
);
542 HAL_StatusTypeDef
HAL_LTDC_ConfigColorKeying_NoReload(LTDC_HandleTypeDef
*hltdc
, uint32_t RGBValue
, uint32_t LayerIdx
);
543 HAL_StatusTypeDef
HAL_LTDC_EnableColorKeying_NoReload(LTDC_HandleTypeDef
*hltdc
, uint32_t LayerIdx
);
544 HAL_StatusTypeDef
HAL_LTDC_DisableColorKeying_NoReload(LTDC_HandleTypeDef
*hltdc
, uint32_t LayerIdx
);
545 HAL_StatusTypeDef
HAL_LTDC_EnableCLUT_NoReload(LTDC_HandleTypeDef
*hltdc
, uint32_t LayerIdx
);
546 HAL_StatusTypeDef
HAL_LTDC_DisableCLUT_NoReload(LTDC_HandleTypeDef
*hltdc
, uint32_t LayerIdx
);
552 /** @addtogroup LTDC_Exported_Functions_Group4
555 /* Peripheral State functions *************************************************/
556 HAL_LTDC_StateTypeDef
HAL_LTDC_GetState(LTDC_HandleTypeDef
*hltdc
);
557 uint32_t HAL_LTDC_GetError(LTDC_HandleTypeDef
*hltdc
);
565 /* Private types -------------------------------------------------------------*/
566 /** @defgroup LTDC_Private_Types LTDC Private Types
574 /* Private variables ---------------------------------------------------------*/
575 /** @defgroup LTDC_Private_Variables LTDC Private Variables
583 /* Private constants ---------------------------------------------------------*/
584 /** @defgroup LTDC_Private_Constants LTDC Private Constants
592 /* Private macros ------------------------------------------------------------*/
593 /** @defgroup LTDC_Private_Macros LTDC Private Macros
596 #define LTDC_LAYER(__HANDLE__, __LAYER__) ((LTDC_Layer_TypeDef *)((uint32_t)(((uint32_t)((__HANDLE__)->Instance)) + 0x84 + (0x80*(__LAYER__)))))
597 #define IS_LTDC_LAYER(LAYER) ((LAYER) <= MAX_LAYER)
598 #define IS_LTDC_HSPOL(HSPOL) (((HSPOL) == LTDC_HSPOLARITY_AL) || \
599 ((HSPOL) == LTDC_HSPOLARITY_AH))
600 #define IS_LTDC_VSPOL(VSPOL) (((VSPOL) == LTDC_VSPOLARITY_AL) || \
601 ((VSPOL) == LTDC_VSPOLARITY_AH))
602 #define IS_LTDC_DEPOL(DEPOL) (((DEPOL) == LTDC_DEPOLARITY_AL) || \
603 ((DEPOL) == LTDC_DEPOLARITY_AH))
604 #define IS_LTDC_PCPOL(PCPOL) (((PCPOL) == LTDC_PCPOLARITY_IPC) || \
605 ((PCPOL) == LTDC_PCPOLARITY_IIPC))
606 #define IS_LTDC_HSYNC(HSYNC) ((HSYNC) <= LTDC_HORIZONTALSYNC)
607 #define IS_LTDC_VSYNC(VSYNC) ((VSYNC) <= LTDC_VERTICALSYNC)
608 #define IS_LTDC_AHBP(AHBP) ((AHBP) <= LTDC_HORIZONTALSYNC)
609 #define IS_LTDC_AVBP(AVBP) ((AVBP) <= LTDC_VERTICALSYNC)
610 #define IS_LTDC_AAW(AAW) ((AAW) <= LTDC_HORIZONTALSYNC)
611 #define IS_LTDC_AAH(AAH) ((AAH) <= LTDC_VERTICALSYNC)
612 #define IS_LTDC_TOTALW(TOTALW) ((TOTALW) <= LTDC_HORIZONTALSYNC)
613 #define IS_LTDC_TOTALH(TOTALH) ((TOTALH) <= LTDC_VERTICALSYNC)
614 #define IS_LTDC_BLUEVALUE(BBLUE) ((BBLUE) <= LTDC_COLOR)
615 #define IS_LTDC_GREENVALUE(BGREEN) ((BGREEN) <= LTDC_COLOR)
616 #define IS_LTDC_REDVALUE(BRED) ((BRED) <= LTDC_COLOR)
617 #define IS_LTDC_BLENDING_FACTOR1(BlendingFactor1) (((BlendingFactor1) == LTDC_BLENDING_FACTOR1_CA) || \
618 ((BlendingFactor1) == LTDC_BLENDING_FACTOR1_PAxCA))
619 #define IS_LTDC_BLENDING_FACTOR2(BlendingFactor2) (((BlendingFactor2) == LTDC_BLENDING_FACTOR2_CA) || \
620 ((BlendingFactor2) == LTDC_BLENDING_FACTOR2_PAxCA))
621 #define IS_LTDC_PIXEL_FORMAT(Pixelformat) (((Pixelformat) == LTDC_PIXEL_FORMAT_ARGB8888) || ((Pixelformat) == LTDC_PIXEL_FORMAT_RGB888) || \
622 ((Pixelformat) == LTDC_PIXEL_FORMAT_RGB565) || ((Pixelformat) == LTDC_PIXEL_FORMAT_ARGB1555) || \
623 ((Pixelformat) == LTDC_PIXEL_FORMAT_ARGB4444) || ((Pixelformat) == LTDC_PIXEL_FORMAT_L8) || \
624 ((Pixelformat) == LTDC_PIXEL_FORMAT_AL44) || ((Pixelformat) == LTDC_PIXEL_FORMAT_AL88))
625 #define IS_LTDC_ALPHA(ALPHA) ((ALPHA) <= LTDC_ALPHA)
626 #define IS_LTDC_HCONFIGST(HCONFIGST) ((HCONFIGST) <= LTDC_STARTPOSITION)
627 #define IS_LTDC_HCONFIGSP(HCONFIGSP) ((HCONFIGSP) <= LTDC_STOPPOSITION)
628 #define IS_LTDC_VCONFIGST(VCONFIGST) ((VCONFIGST) <= LTDC_STARTPOSITION)
629 #define IS_LTDC_VCONFIGSP(VCONFIGSP) ((VCONFIGSP) <= LTDC_STOPPOSITION)
630 #define IS_LTDC_CFBP(CFBP) ((CFBP) <= LTDC_COLOR_FRAME_BUFFER)
631 #define IS_LTDC_CFBLL(CFBLL) ((CFBLL) <= LTDC_COLOR_FRAME_BUFFER)
632 #define IS_LTDC_CFBLNBR(CFBLNBR) ((CFBLNBR) <= LTDC_LINE_NUMBER)
633 #define IS_LTDC_LIPOS(LIPOS) ((LIPOS) <= 0x7FF)
634 #define IS_LTDC_RELAOD(RELOADTYPE) (((RELOADTYPE) == LTDC_RELOAD_IMMEDIATE) || ((RELOADTYPE) == LTDC_SRCR_VBR))
639 /* Private functions ---------------------------------------------------------*/
640 /** @defgroup LTDC_Private_Functions LTDC Private Functions
651 #endif /* STM32F746xx || STM32F756xx || STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx */
660 #endif /* __STM32F7xx_HAL_LTDC_H */
662 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/