2 ******************************************************************************
\r
3 * @file stm32f7xx_hal_ltdc.h
\r
4 * @author MCD Application Team
\r
6 * @date 06-March-2015
\r
7 * @brief Header file of LTDC HAL module.
\r
8 ******************************************************************************
\r
11 * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
\r
13 * Redistribution and use in source and binary forms, with or without modification,
\r
14 * are permitted provided that the following conditions are met:
\r
15 * 1. Redistributions of source code must retain the above copyright notice,
\r
16 * this list of conditions and the following disclaimer.
\r
17 * 2. Redistributions in binary form must reproduce the above copyright notice,
\r
18 * this list of conditions and the following disclaimer in the documentation
\r
19 * and/or other materials provided with the distribution.
\r
20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
\r
21 * may be used to endorse or promote products derived from this software
\r
22 * without specific prior written permission.
\r
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
\r
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
\r
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
\r
27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
\r
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
\r
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
\r
30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
\r
31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
\r
32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
\r
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\r
35 ******************************************************************************
\r
38 /* Define to prevent recursive inclusion -------------------------------------*/
\r
39 #ifndef __STM32F7xx_HAL_LTDC_H
\r
40 #define __STM32F7xx_HAL_LTDC_H
\r
46 /* Includes ------------------------------------------------------------------*/
\r
47 #include "stm32f7xx_hal_def.h"
\r
50 /** @addtogroup STM32F7xx_HAL_Driver
\r
54 /** @defgroup LTDC LTDC
\r
55 * @brief LTDC HAL module driver
\r
59 /* Exported types ------------------------------------------------------------*/
\r
60 /** @defgroup LTDC_Exported_Types LTDC Exported Types
\r
66 * @brief LTDC color structure definition
\r
70 uint8_t Blue; /*!< Configures the blue value.
\r
71 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */
\r
73 uint8_t Green; /*!< Configures the green value.
\r
74 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */
\r
76 uint8_t Red; /*!< Configures the red value.
\r
77 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */
\r
79 uint8_t Reserved; /*!< Reserved 0xFF */
\r
80 } LTDC_ColorTypeDef;
\r
83 * @brief LTDC Init structure definition
\r
87 uint32_t HSPolarity; /*!< configures the horizontal synchronization polarity.
\r
88 This parameter can be one value of @ref LTDC_HS_POLARITY */
\r
90 uint32_t VSPolarity; /*!< configures the vertical synchronization polarity.
\r
91 This parameter can be one value of @ref LTDC_VS_POLARITY */
\r
93 uint32_t DEPolarity; /*!< configures the data enable polarity.
\r
94 This parameter can be one of value of @ref LTDC_DE_POLARITY */
\r
96 uint32_t PCPolarity; /*!< configures the pixel clock polarity.
\r
97 This parameter can be one of value of @ref LTDC_PC_POLARITY */
\r
99 uint32_t HorizontalSync; /*!< configures the number of Horizontal synchronization width.
\r
100 This parameter must be a number between Min_Data = 0x000 and Max_Data = 0xFFF. */
\r
102 uint32_t VerticalSync; /*!< configures the number of Vertical synchronization height.
\r
103 This parameter must be a number between Min_Data = 0x000 and Max_Data = 0x7FF. */
\r
105 uint32_t AccumulatedHBP; /*!< configures the accumulated horizontal back porch width.
\r
106 This parameter must be a number between Min_Data = LTDC_HorizontalSync and Max_Data = 0xFFF. */
\r
108 uint32_t AccumulatedVBP; /*!< configures the accumulated vertical back porch height.
\r
109 This parameter must be a number between Min_Data = LTDC_VerticalSync and Max_Data = 0x7FF. */
\r
111 uint32_t AccumulatedActiveW; /*!< configures the accumulated active width.
\r
112 This parameter must be a number between Min_Data = LTDC_AccumulatedHBP and Max_Data = 0xFFF. */
\r
114 uint32_t AccumulatedActiveH; /*!< configures the accumulated active height.
\r
115 This parameter must be a number between Min_Data = LTDC_AccumulatedVBP and Max_Data = 0x7FF. */
\r
117 uint32_t TotalWidth; /*!< configures the total width.
\r
118 This parameter must be a number between Min_Data = LTDC_AccumulatedActiveW and Max_Data = 0xFFF. */
\r
120 uint32_t TotalHeigh; /*!< configures the total height.
\r
121 This parameter must be a number between Min_Data = LTDC_AccumulatedActiveH and Max_Data = 0x7FF. */
\r
123 LTDC_ColorTypeDef Backcolor; /*!< Configures the background color. */
\r
124 } LTDC_InitTypeDef;
\r
127 * @brief LTDC Layer structure definition
\r
131 uint32_t WindowX0; /*!< Configures the Window Horizontal Start Position.
\r
132 This parameter must be a number between Min_Data = 0x000 and Max_Data = 0xFFF. */
\r
134 uint32_t WindowX1; /*!< Configures the Window Horizontal Stop Position.
\r
135 This parameter must be a number between Min_Data = 0x000 and Max_Data = 0xFFF. */
\r
137 uint32_t WindowY0; /*!< Configures the Window vertical Start Position.
\r
138 This parameter must be a number between Min_Data = 0x000 and Max_Data = 0xFFF. */
\r
140 uint32_t WindowY1; /*!< Configures the Window vertical Stop Position.
\r
141 This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF. */
\r
143 uint32_t PixelFormat; /*!< Specifies the pixel format.
\r
144 This parameter can be one of value of @ref LTDC_Pixelformat */
\r
146 uint32_t Alpha; /*!< Specifies the constant alpha used for blending.
\r
147 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */
\r
149 uint32_t Alpha0; /*!< Configures the default alpha value.
\r
150 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */
\r
152 uint32_t BlendingFactor1; /*!< Select the blending factor 1.
\r
153 This parameter can be one of value of @ref LTDC_BlendingFactor1 */
\r
155 uint32_t BlendingFactor2; /*!< Select the blending factor 2.
\r
156 This parameter can be one of value of @ref LTDC_BlendingFactor2 */
\r
158 uint32_t FBStartAdress; /*!< Configures the color frame buffer address */
\r
160 uint32_t ImageWidth; /*!< Configures the color frame buffer line length.
\r
161 This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0x1FFF. */
\r
163 uint32_t ImageHeight; /*!< Specifies the number of line in frame buffer.
\r
164 This parameter must be a number between Min_Data = 0x000 and Max_Data = 0x7FF. */
\r
166 LTDC_ColorTypeDef Backcolor; /*!< Configures the layer background color. */
\r
167 } LTDC_LayerCfgTypeDef;
\r
170 * @brief HAL LTDC State structures definition
\r
174 HAL_LTDC_STATE_RESET = 0x00, /*!< LTDC not yet initialized or disabled */
\r
175 HAL_LTDC_STATE_READY = 0x01, /*!< LTDC initialized and ready for use */
\r
176 HAL_LTDC_STATE_BUSY = 0x02, /*!< LTDC internal process is ongoing */
\r
177 HAL_LTDC_STATE_TIMEOUT = 0x03, /*!< LTDC Timeout state */
\r
178 HAL_LTDC_STATE_ERROR = 0x04 /*!< LTDC state error */
\r
179 }HAL_LTDC_StateTypeDef;
\r
182 * @brief LTDC handle Structure definition
\r
186 LTDC_TypeDef *Instance; /*!< LTDC Register base address */
\r
188 LTDC_InitTypeDef Init; /*!< LTDC parameters */
\r
190 LTDC_LayerCfgTypeDef LayerCfg[MAX_LAYER]; /*!< LTDC Layers parameters */
\r
192 HAL_LockTypeDef Lock; /*!< LTDC Lock */
\r
194 __IO HAL_LTDC_StateTypeDef State; /*!< LTDC state */
\r
196 __IO uint32_t ErrorCode; /*!< LTDC Error code */
\r
198 } LTDC_HandleTypeDef;
\r
203 /* Exported constants --------------------------------------------------------*/
\r
204 /** @defgroup LTDC_Exported_Constants LTDC Exported Constants
\r
208 /** @defgroup LTDC_Error_Code LTDC Error Code
\r
211 #define HAL_LTDC_ERROR_NONE ((uint32_t)0x00000000) /*!< LTDC No error */
\r
212 #define HAL_LTDC_ERROR_TE ((uint32_t)0x00000001) /*!< LTDC Transfer error */
\r
213 #define HAL_LTDC_ERROR_FU ((uint32_t)0x00000002) /*!< LTDC FIFO Underrun */
\r
214 #define HAL_LTDC_ERROR_TIMEOUT ((uint32_t)0x00000020) /*!< LTDC Timeout error */
\r
219 /** @defgroup LTDC_HS_POLARITY LTDC HS POLARITY
\r
222 #define LTDC_HSPOLARITY_AL ((uint32_t)0x00000000) /*!< Horizontal Synchronization is active low. */
\r
223 #define LTDC_HSPOLARITY_AH LTDC_GCR_HSPOL /*!< Horizontal Synchronization is active high. */
\r
228 /** @defgroup LTDC_VS_POLARITY LTDC VS POLARITY
\r
231 #define LTDC_VSPOLARITY_AL ((uint32_t)0x00000000) /*!< Vertical Synchronization is active low. */
\r
232 #define LTDC_VSPOLARITY_AH LTDC_GCR_VSPOL /*!< Vertical Synchronization is active high. */
\r
237 /** @defgroup LTDC_DE_POLARITY LTDC DE POLARITY
\r
240 #define LTDC_DEPOLARITY_AL ((uint32_t)0x00000000) /*!< Data Enable, is active low. */
\r
241 #define LTDC_DEPOLARITY_AH LTDC_GCR_DEPOL /*!< Data Enable, is active high. */
\r
246 /** @defgroup LTDC_PC_POLARITY LTDC PC POLARITY
\r
249 #define LTDC_PCPOLARITY_IPC ((uint32_t)0x00000000) /*!< input pixel clock. */
\r
250 #define LTDC_PCPOLARITY_IIPC LTDC_GCR_PCPOL /*!< inverted input pixel clock. */
\r
255 /** @defgroup LTDC_SYNC LTDC SYNC
\r
258 #define LTDC_HORIZONTALSYNC (LTDC_SSCR_HSW >> 16) /*!< Horizontal synchronization width. */
\r
259 #define LTDC_VERTICALSYNC LTDC_SSCR_VSH /*!< Vertical synchronization height. */
\r
264 /** @defgroup LTDC_BACK_COLOR LTDC BACK COLOR
\r
267 #define LTDC_COLOR ((uint32_t)0x000000FF) /*!< Color mask */
\r
272 /** @defgroup LTDC_BlendingFactor1 LTDC Blending Factor1
\r
275 #define LTDC_BLENDING_FACTOR1_CA ((uint32_t)0x00000400) /*!< Blending factor : Cte Alpha */
\r
276 #define LTDC_BLENDING_FACTOR1_PAxCA ((uint32_t)0x00000600) /*!< Blending factor : Cte Alpha x Pixel Alpha*/
\r
281 /** @defgroup LTDC_BlendingFactor2 LTDC Blending Factor2
\r
284 #define LTDC_BLENDING_FACTOR2_CA ((uint32_t)0x00000005) /*!< Blending factor : Cte Alpha */
\r
285 #define LTDC_BLENDING_FACTOR2_PAxCA ((uint32_t)0x00000007) /*!< Blending factor : Cte Alpha x Pixel Alpha*/
\r
290 /** @defgroup LTDC_Pixelformat LTDC Pixel format
\r
293 #define LTDC_PIXEL_FORMAT_ARGB8888 ((uint32_t)0x00000000) /*!< ARGB8888 LTDC pixel format */
\r
294 #define LTDC_PIXEL_FORMAT_RGB888 ((uint32_t)0x00000001) /*!< RGB888 LTDC pixel format */
\r
295 #define LTDC_PIXEL_FORMAT_RGB565 ((uint32_t)0x00000002) /*!< RGB565 LTDC pixel format */
\r
296 #define LTDC_PIXEL_FORMAT_ARGB1555 ((uint32_t)0x00000003) /*!< ARGB1555 LTDC pixel format */
\r
297 #define LTDC_PIXEL_FORMAT_ARGB4444 ((uint32_t)0x00000004) /*!< ARGB4444 LTDC pixel format */
\r
298 #define LTDC_PIXEL_FORMAT_L8 ((uint32_t)0x00000005) /*!< L8 LTDC pixel format */
\r
299 #define LTDC_PIXEL_FORMAT_AL44 ((uint32_t)0x00000006) /*!< AL44 LTDC pixel format */
\r
300 #define LTDC_PIXEL_FORMAT_AL88 ((uint32_t)0x00000007) /*!< AL88 LTDC pixel format */
\r
305 /** @defgroup LTDC_Alpha LTDC Alpha
\r
308 #define LTDC_ALPHA LTDC_LxCACR_CONSTA /*!< LTDC Cte Alpha mask */
\r
313 /** @defgroup LTDC_LAYER_Config LTDC LAYER Config
\r
316 #define LTDC_STOPPOSITION (LTDC_LxWHPCR_WHSPPOS >> 16) /*!< LTDC Layer stop position */
\r
317 #define LTDC_STARTPOSITION LTDC_LxWHPCR_WHSTPOS /*!< LTDC Layer start position */
\r
319 #define LTDC_COLOR_FRAME_BUFFER LTDC_LxCFBLR_CFBLL /*!< LTDC Layer Line length */
\r
320 #define LTDC_LINE_NUMBER LTDC_LxCFBLNR_CFBLNBR /*!< LTDC Layer Line number */
\r
325 /** @defgroup LTDC_Interrupts LTDC Interrupts
\r
328 #define LTDC_IT_LI LTDC_IER_LIE
\r
329 #define LTDC_IT_FU LTDC_IER_FUIE
\r
330 #define LTDC_IT_TE LTDC_IER_TERRIE
\r
331 #define LTDC_IT_RR LTDC_IER_RRIE
\r
336 /** @defgroup LTDC_Flag LTDC Flag
\r
339 #define LTDC_FLAG_LI LTDC_ISR_LIF
\r
340 #define LTDC_FLAG_FU LTDC_ISR_FUIF
\r
341 #define LTDC_FLAG_TE LTDC_ISR_TERRIF
\r
342 #define LTDC_FLAG_RR LTDC_ISR_RRIF
\r
351 /* Exported macro ------------------------------------------------------------*/
\r
352 /** @defgroup LTDC_Exported_Macros LTDC Exported Macros
\r
356 /** @brief Reset LTDC handle state
\r
357 * @param __HANDLE__: specifies the LTDC handle.
\r
360 #define __HAL_LTDC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_LTDC_STATE_RESET)
\r
363 * @brief Enable the LTDC.
\r
364 * @param __HANDLE__: LTDC handle
\r
367 #define __HAL_LTDC_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->GCR |= LTDC_GCR_LTDCEN)
\r
370 * @brief Disable the LTDC.
\r
371 * @param __HANDLE__: LTDC handle
\r
374 #define __HAL_LTDC_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->GCR &= ~(LTDC_GCR_LTDCEN))
\r
377 * @brief Enable the LTDC Layer.
\r
378 * @param __HANDLE__: LTDC handle
\r
379 * @param __LAYER__: Specify the layer to be enabled
\r
380 * This parameter can be 0 or 1
\r
383 #define __HAL_LTDC_LAYER_ENABLE(__HANDLE__, __LAYER__) ((LTDC_LAYER((__HANDLE__), (__LAYER__)))->CR |= (uint32_t)LTDC_LxCR_LEN)
\r
386 * @brief Disable the LTDC Layer.
\r
387 * @param __HANDLE__: LTDC handle
\r
388 * @param __LAYER__: Specify the layer to be disabled
\r
389 * This parameter can be 0 or 1
\r
392 #define __HAL_LTDC_LAYER_DISABLE(__HANDLE__, __LAYER__) ((LTDC_LAYER((__HANDLE__), (__LAYER__)))->CR &= ~(uint32_t)LTDC_LxCR_LEN)
\r
395 * @brief Reload Layer Configuration.
\r
396 * @param __HANDLE__: LTDC handle
\r
399 #define __HAL_LTDC_RELOAD_CONFIG(__HANDLE__) ((__HANDLE__)->Instance->SRCR |= LTDC_SRCR_IMR)
\r
401 /* Interrupt & Flag management */
\r
403 * @brief Get the LTDC pending flags.
\r
404 * @param __HANDLE__: LTDC handle
\r
405 * @param __FLAG__: Get the specified flag.
\r
406 * This parameter can be any combination of the following values:
\r
407 * @arg LTDC_FLAG_LI: Line Interrupt flag
\r
408 * @arg LTDC_FLAG_FU: FIFO Underrun Interrupt flag
\r
409 * @arg LTDC_FLAG_TE: Transfer Error interrupt flag
\r
410 * @arg LTDC_FLAG_RR: Register Reload Interrupt Flag
\r
411 * @retval The state of FLAG (SET or RESET).
\r
413 #define __HAL_LTDC_GET_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR & (__FLAG__))
\r
416 * @brief Clears the LTDC pending flags.
\r
417 * @param __HANDLE__: LTDC handle
\r
418 * @param __FLAG__: specifies the flag to clear.
\r
419 * This parameter can be any combination of the following values:
\r
420 * @arg LTDC_FLAG_LI: Line Interrupt flag
\r
421 * @arg LTDC_FLAG_FU: FIFO Underrun Interrupt flag
\r
422 * @arg LTDC_FLAG_TE: Transfer Error interrupt flag
\r
423 * @arg LTDC_FLAG_RR: Register Reload Interrupt Flag
\r
426 #define __HAL_LTDC_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = (__FLAG__))
\r
429 * @brief Enables the specified LTDC interrupts.
\r
430 * @param __HANDLE__: LTDC handle
\r
431 * @param __INTERRUPT__: specifies the LTDC interrupt sources to be enabled.
\r
432 * This parameter can be any combination of the following values:
\r
433 * @arg LTDC_IT_LI: Line Interrupt flag
\r
434 * @arg LTDC_IT_FU: FIFO Underrun Interrupt flag
\r
435 * @arg LTDC_IT_TE: Transfer Error interrupt flag
\r
436 * @arg LTDC_IT_RR: Register Reload Interrupt Flag
\r
439 #define __HAL_LTDC_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER |= (__INTERRUPT__))
\r
442 * @brief Disables the specified LTDC interrupts.
\r
443 * @param __HANDLE__: LTDC handle
\r
444 * @param __INTERRUPT__: specifies the LTDC interrupt sources to be disabled.
\r
445 * This parameter can be any combination of the following values:
\r
446 * @arg LTDC_IT_LI: Line Interrupt flag
\r
447 * @arg LTDC_IT_FU: FIFO Underrun Interrupt flag
\r
448 * @arg LTDC_IT_TE: Transfer Error interrupt flag
\r
449 * @arg LTDC_IT_RR: Register Reload Interrupt Flag
\r
452 #define __HAL_LTDC_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER &= ~(__INTERRUPT__))
\r
455 * @brief Checks whether the specified LTDC interrupt has occurred or not.
\r
456 * @param __HANDLE__: LTDC handle
\r
457 * @param __INTERRUPT__: specifies the LTDC interrupt source to check.
\r
458 * This parameter can be one of the following values:
\r
459 * @arg LTDC_IT_LI: Line Interrupt flag
\r
460 * @arg LTDC_IT_FU: FIFO Underrun Interrupt flag
\r
461 * @arg LTDC_IT_TE: Transfer Error interrupt flag
\r
462 * @arg LTDC_IT_RR: Register Reload Interrupt Flag
\r
463 * @retval The state of INTERRUPT (SET or RESET).
\r
465 #define __HAL_LTDC_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->ISR & (__INTERRUPT__))
\r
470 /* Exported functions --------------------------------------------------------*/
\r
471 /** @addtogroup LTDC_Exported_Functions
\r
474 /** @addtogroup LTDC_Exported_Functions_Group1
\r
477 /* Initialization and de-initialization functions *****************************/
\r
478 HAL_StatusTypeDef HAL_LTDC_Init(LTDC_HandleTypeDef *hltdc);
\r
479 HAL_StatusTypeDef HAL_LTDC_DeInit(LTDC_HandleTypeDef *hltdc);
\r
480 void HAL_LTDC_MspInit(LTDC_HandleTypeDef* hltdc);
\r
481 void HAL_LTDC_MspDeInit(LTDC_HandleTypeDef* hltdc);
\r
482 void HAL_LTDC_ErrorCallback(LTDC_HandleTypeDef *hltdc);
\r
483 void HAL_LTDC_LineEvenCallback(LTDC_HandleTypeDef *hltdc);
\r
488 /** @addtogroup LTDC_Exported_Functions_Group2
\r
491 /* IO operation functions *****************************************************/
\r
492 void HAL_LTDC_IRQHandler(LTDC_HandleTypeDef *hltdc);
\r
497 /** @addtogroup LTDC_Exported_Functions_Group3
\r
500 /* Peripheral Control functions ***********************************************/
\r
501 HAL_StatusTypeDef HAL_LTDC_ConfigLayer(LTDC_HandleTypeDef *hltdc, LTDC_LayerCfgTypeDef *pLayerCfg, uint32_t LayerIdx);
\r
502 HAL_StatusTypeDef HAL_LTDC_SetWindowSize(LTDC_HandleTypeDef *hltdc, uint32_t XSize, uint32_t YSize, uint32_t LayerIdx);
\r
503 HAL_StatusTypeDef HAL_LTDC_SetWindowPosition(LTDC_HandleTypeDef *hltdc, uint32_t X0, uint32_t Y0, uint32_t LayerIdx);
\r
504 HAL_StatusTypeDef HAL_LTDC_SetPixelFormat(LTDC_HandleTypeDef *hltdc, uint32_t Pixelformat, uint32_t LayerIdx);
\r
505 HAL_StatusTypeDef HAL_LTDC_SetAlpha(LTDC_HandleTypeDef *hltdc, uint32_t Alpha, uint32_t LayerIdx);
\r
506 HAL_StatusTypeDef HAL_LTDC_SetAddress(LTDC_HandleTypeDef *hltdc, uint32_t Address, uint32_t LayerIdx);
\r
507 HAL_StatusTypeDef HAL_LTDC_ConfigColorKeying(LTDC_HandleTypeDef *hltdc, uint32_t RGBValue, uint32_t LayerIdx);
\r
508 HAL_StatusTypeDef HAL_LTDC_ConfigCLUT(LTDC_HandleTypeDef *hltdc, uint32_t *pCLUT, uint32_t CLUTSize, uint32_t LayerIdx);
\r
509 HAL_StatusTypeDef HAL_LTDC_EnableColorKeying(LTDC_HandleTypeDef *hltdc, uint32_t LayerIdx);
\r
510 HAL_StatusTypeDef HAL_LTDC_DisableColorKeying(LTDC_HandleTypeDef *hltdc, uint32_t LayerIdx);
\r
511 HAL_StatusTypeDef HAL_LTDC_EnableCLUT(LTDC_HandleTypeDef *hltdc, uint32_t LayerIdx);
\r
512 HAL_StatusTypeDef HAL_LTDC_DisableCLUT(LTDC_HandleTypeDef *hltdc, uint32_t LayerIdx);
\r
513 HAL_StatusTypeDef HAL_LTDC_ProgramLineEvent(LTDC_HandleTypeDef *hltdc, uint32_t Line);
\r
514 HAL_StatusTypeDef HAL_LTDC_EnableDither(LTDC_HandleTypeDef *hltdc);
\r
515 HAL_StatusTypeDef HAL_LTDC_DisableDither(LTDC_HandleTypeDef *hltdc);
\r
520 /** @addtogroup LTDC_Exported_Functions_Group4
\r
523 /* Peripheral State functions *************************************************/
\r
524 HAL_LTDC_StateTypeDef HAL_LTDC_GetState(LTDC_HandleTypeDef *hltdc);
\r
525 uint32_t HAL_LTDC_GetError(LTDC_HandleTypeDef *hltdc);
\r
533 /* Private types -------------------------------------------------------------*/
\r
534 /** @defgroup LTDC_Private_Types LTDC Private Types
\r
542 /* Private variables ---------------------------------------------------------*/
\r
543 /** @defgroup LTDC_Private_Variables LTDC Private Variables
\r
551 /* Private constants ---------------------------------------------------------*/
\r
552 /** @defgroup LTDC_Private_Constants LTDC Private Constants
\r
560 /* Private macros ------------------------------------------------------------*/
\r
561 /** @defgroup LTDC_Private_Macros LTDC Private Macros
\r
564 #define LTDC_LAYER(__HANDLE__, __LAYER__) ((LTDC_Layer_TypeDef *)((uint32_t)(((uint32_t)((__HANDLE__)->Instance)) + 0x84 + (0x80*(__LAYER__)))))
\r
565 #define IS_LTDC_LAYER(LAYER) ((LAYER) <= MAX_LAYER)
\r
566 #define IS_LTDC_HSPOL(HSPOL) (((HSPOL) == LTDC_HSPOLARITY_AL) || \
\r
567 ((HSPOL) == LTDC_HSPOLARITY_AH))
\r
568 #define IS_LTDC_VSPOL(VSPOL) (((VSPOL) == LTDC_VSPOLARITY_AL) || \
\r
569 ((VSPOL) == LTDC_VSPOLARITY_AH))
\r
570 #define IS_LTDC_DEPOL(DEPOL) (((DEPOL) == LTDC_DEPOLARITY_AL) || \
\r
571 ((DEPOL) == LTDC_DEPOLARITY_AH))
\r
572 #define IS_LTDC_PCPOL(PCPOL) (((PCPOL) == LTDC_PCPOLARITY_IPC) || \
\r
573 ((PCPOL) == LTDC_PCPOLARITY_IIPC))
\r
574 #define IS_LTDC_HSYNC(HSYNC) ((HSYNC) <= LTDC_HORIZONTALSYNC)
\r
575 #define IS_LTDC_VSYNC(VSYNC) ((VSYNC) <= LTDC_VERTICALSYNC)
\r
576 #define IS_LTDC_AHBP(AHBP) ((AHBP) <= LTDC_HORIZONTALSYNC)
\r
577 #define IS_LTDC_AVBP(AVBP) ((AVBP) <= LTDC_VERTICALSYNC)
\r
578 #define IS_LTDC_AAW(AAW) ((AAW) <= LTDC_HORIZONTALSYNC)
\r
579 #define IS_LTDC_AAH(AAH) ((AAH) <= LTDC_VERTICALSYNC)
\r
580 #define IS_LTDC_TOTALW(TOTALW) ((TOTALW) <= LTDC_HORIZONTALSYNC)
\r
581 #define IS_LTDC_TOTALH(TOTALH) ((TOTALH) <= LTDC_VERTICALSYNC)
\r
582 #define IS_LTDC_BLUEVALUE(BBLUE) ((BBLUE) <= LTDC_COLOR)
\r
583 #define IS_LTDC_GREENVALUE(BGREEN) ((BGREEN) <= LTDC_COLOR)
\r
584 #define IS_LTDC_REDVALUE(BRED) ((BRED) <= LTDC_COLOR)
\r
585 #define IS_LTDC_BLENDING_FACTOR1(BlendingFactor1) (((BlendingFactor1) == LTDC_BLENDING_FACTOR1_CA) || \
\r
586 ((BlendingFactor1) == LTDC_BLENDING_FACTOR1_PAxCA))
\r
587 #define IS_LTDC_BLENDING_FACTOR2(BlendingFactor2) (((BlendingFactor2) == LTDC_BLENDING_FACTOR2_CA) || \
\r
588 ((BlendingFactor2) == LTDC_BLENDING_FACTOR2_PAxCA))
\r
589 #define IS_LTDC_PIXEL_FORMAT(Pixelformat) (((Pixelformat) == LTDC_PIXEL_FORMAT_ARGB8888) || ((Pixelformat) == LTDC_PIXEL_FORMAT_RGB888) || \
\r
590 ((Pixelformat) == LTDC_PIXEL_FORMAT_RGB565) || ((Pixelformat) == LTDC_PIXEL_FORMAT_ARGB1555) || \
\r
591 ((Pixelformat) == LTDC_PIXEL_FORMAT_ARGB4444) || ((Pixelformat) == LTDC_PIXEL_FORMAT_L8) || \
\r
592 ((Pixelformat) == LTDC_PIXEL_FORMAT_AL44) || ((Pixelformat) == LTDC_PIXEL_FORMAT_AL88))
\r
593 #define IS_LTDC_ALPHA(ALPHA) ((ALPHA) <= LTDC_ALPHA)
\r
594 #define IS_LTDC_HCONFIGST(HCONFIGST) ((HCONFIGST) <= LTDC_STARTPOSITION)
\r
595 #define IS_LTDC_HCONFIGSP(HCONFIGSP) ((HCONFIGSP) <= LTDC_STOPPOSITION)
\r
596 #define IS_LTDC_VCONFIGST(VCONFIGST) ((VCONFIGST) <= LTDC_STARTPOSITION)
\r
597 #define IS_LTDC_VCONFIGSP(VCONFIGSP) ((VCONFIGSP) <= LTDC_STOPPOSITION)
\r
598 #define IS_LTDC_CFBP(CFBP) ((CFBP) <= LTDC_COLOR_FRAME_BUFFER)
\r
599 #define IS_LTDC_CFBLL(CFBLL) ((CFBLL) <= LTDC_COLOR_FRAME_BUFFER)
\r
600 #define IS_LTDC_CFBLNBR(CFBLNBR) ((CFBLNBR) <= LTDC_LINE_NUMBER)
\r
601 #define IS_LTDC_LIPOS(LIPOS) ((LIPOS) <= 0x7FF)
\r
606 /* Private functions ---------------------------------------------------------*/
\r
607 /** @defgroup LTDC_Private_Functions LTDC Private Functions
\r
627 #endif /* __STM32F7xx_HAL_LTDC_H */
\r
629 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
\r