2 ******************************************************************************
\r
3 * @file stm32f7xx_hal_ltdc.h
\r
4 * @author MCD Application Team
\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 #if defined(STM32F756xx) || defined(STM32F746xx)
\r
47 /* Includes ------------------------------------------------------------------*/
\r
48 #include "stm32f7xx_hal_def.h"
\r
51 /** @addtogroup STM32F7xx_HAL_Driver
\r
55 /** @defgroup LTDC LTDC
\r
56 * @brief LTDC HAL module driver
\r
60 /* Exported types ------------------------------------------------------------*/
\r
61 /** @defgroup LTDC_Exported_Types LTDC Exported Types
\r
67 * @brief LTDC color structure definition
\r
71 uint8_t Blue; /*!< Configures the blue value.
\r
72 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */
\r
74 uint8_t Green; /*!< Configures the green value.
\r
75 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */
\r
77 uint8_t Red; /*!< Configures the red value.
\r
78 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */
\r
80 uint8_t Reserved; /*!< Reserved 0xFF */
\r
81 } LTDC_ColorTypeDef;
\r
84 * @brief LTDC Init structure definition
\r
88 uint32_t HSPolarity; /*!< configures the horizontal synchronization polarity.
\r
89 This parameter can be one value of @ref LTDC_HS_POLARITY */
\r
91 uint32_t VSPolarity; /*!< configures the vertical synchronization polarity.
\r
92 This parameter can be one value of @ref LTDC_VS_POLARITY */
\r
94 uint32_t DEPolarity; /*!< configures the data enable polarity.
\r
95 This parameter can be one of value of @ref LTDC_DE_POLARITY */
\r
97 uint32_t PCPolarity; /*!< configures the pixel clock polarity.
\r
98 This parameter can be one of value of @ref LTDC_PC_POLARITY */
\r
100 uint32_t HorizontalSync; /*!< configures the number of Horizontal synchronization width.
\r
101 This parameter must be a number between Min_Data = 0x000 and Max_Data = 0xFFF. */
\r
103 uint32_t VerticalSync; /*!< configures the number of Vertical synchronization height.
\r
104 This parameter must be a number between Min_Data = 0x000 and Max_Data = 0x7FF. */
\r
106 uint32_t AccumulatedHBP; /*!< configures the accumulated horizontal back porch width.
\r
107 This parameter must be a number between Min_Data = LTDC_HorizontalSync and Max_Data = 0xFFF. */
\r
109 uint32_t AccumulatedVBP; /*!< configures the accumulated vertical back porch height.
\r
110 This parameter must be a number between Min_Data = LTDC_VerticalSync and Max_Data = 0x7FF. */
\r
112 uint32_t AccumulatedActiveW; /*!< configures the accumulated active width.
\r
113 This parameter must be a number between Min_Data = LTDC_AccumulatedHBP and Max_Data = 0xFFF. */
\r
115 uint32_t AccumulatedActiveH; /*!< configures the accumulated active height.
\r
116 This parameter must be a number between Min_Data = LTDC_AccumulatedVBP and Max_Data = 0x7FF. */
\r
118 uint32_t TotalWidth; /*!< configures the total width.
\r
119 This parameter must be a number between Min_Data = LTDC_AccumulatedActiveW and Max_Data = 0xFFF. */
\r
121 uint32_t TotalHeigh; /*!< configures the total height.
\r
122 This parameter must be a number between Min_Data = LTDC_AccumulatedActiveH and Max_Data = 0x7FF. */
\r
124 LTDC_ColorTypeDef Backcolor; /*!< Configures the background color. */
\r
125 } LTDC_InitTypeDef;
\r
128 * @brief LTDC Layer structure definition
\r
132 uint32_t WindowX0; /*!< Configures the Window Horizontal Start Position.
\r
133 This parameter must be a number between Min_Data = 0x000 and Max_Data = 0xFFF. */
\r
135 uint32_t WindowX1; /*!< Configures the Window Horizontal Stop Position.
\r
136 This parameter must be a number between Min_Data = 0x000 and Max_Data = 0xFFF. */
\r
138 uint32_t WindowY0; /*!< Configures the Window vertical Start Position.
\r
139 This parameter must be a number between Min_Data = 0x000 and Max_Data = 0xFFF. */
\r
141 uint32_t WindowY1; /*!< Configures the Window vertical Stop Position.
\r
142 This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF. */
\r
144 uint32_t PixelFormat; /*!< Specifies the pixel format.
\r
145 This parameter can be one of value of @ref LTDC_Pixelformat */
\r
147 uint32_t Alpha; /*!< Specifies the constant alpha used for blending.
\r
148 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */
\r
150 uint32_t Alpha0; /*!< Configures the default alpha value.
\r
151 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */
\r
153 uint32_t BlendingFactor1; /*!< Select the blending factor 1.
\r
154 This parameter can be one of value of @ref LTDC_BlendingFactor1 */
\r
156 uint32_t BlendingFactor2; /*!< Select the blending factor 2.
\r
157 This parameter can be one of value of @ref LTDC_BlendingFactor2 */
\r
159 uint32_t FBStartAdress; /*!< Configures the color frame buffer address */
\r
161 uint32_t ImageWidth; /*!< Configures the color frame buffer line length.
\r
162 This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0x1FFF. */
\r
164 uint32_t ImageHeight; /*!< Specifies the number of line in frame buffer.
\r
165 This parameter must be a number between Min_Data = 0x000 and Max_Data = 0x7FF. */
\r
167 LTDC_ColorTypeDef Backcolor; /*!< Configures the layer background color. */
\r
168 } LTDC_LayerCfgTypeDef;
\r
171 * @brief HAL LTDC State structures definition
\r
175 HAL_LTDC_STATE_RESET = 0x00, /*!< LTDC not yet initialized or disabled */
\r
176 HAL_LTDC_STATE_READY = 0x01, /*!< LTDC initialized and ready for use */
\r
177 HAL_LTDC_STATE_BUSY = 0x02, /*!< LTDC internal process is ongoing */
\r
178 HAL_LTDC_STATE_TIMEOUT = 0x03, /*!< LTDC Timeout state */
\r
179 HAL_LTDC_STATE_ERROR = 0x04 /*!< LTDC state error */
\r
180 }HAL_LTDC_StateTypeDef;
\r
183 * @brief LTDC handle Structure definition
\r
187 LTDC_TypeDef *Instance; /*!< LTDC Register base address */
\r
189 LTDC_InitTypeDef Init; /*!< LTDC parameters */
\r
191 LTDC_LayerCfgTypeDef LayerCfg[MAX_LAYER]; /*!< LTDC Layers parameters */
\r
193 HAL_LockTypeDef Lock; /*!< LTDC Lock */
\r
195 __IO HAL_LTDC_StateTypeDef State; /*!< LTDC state */
\r
197 __IO uint32_t ErrorCode; /*!< LTDC Error code */
\r
199 } LTDC_HandleTypeDef;
\r
204 /* Exported constants --------------------------------------------------------*/
\r
205 /** @defgroup LTDC_Exported_Constants LTDC Exported Constants
\r
209 /** @defgroup LTDC_Error_Code LTDC Error Code
\r
212 #define HAL_LTDC_ERROR_NONE ((uint32_t)0x00000000) /*!< LTDC No error */
\r
213 #define HAL_LTDC_ERROR_TE ((uint32_t)0x00000001) /*!< LTDC Transfer error */
\r
214 #define HAL_LTDC_ERROR_FU ((uint32_t)0x00000002) /*!< LTDC FIFO Underrun */
\r
215 #define HAL_LTDC_ERROR_TIMEOUT ((uint32_t)0x00000020) /*!< LTDC Timeout error */
\r
220 /** @defgroup LTDC_HS_POLARITY LTDC HS POLARITY
\r
223 #define LTDC_HSPOLARITY_AL ((uint32_t)0x00000000) /*!< Horizontal Synchronization is active low. */
\r
224 #define LTDC_HSPOLARITY_AH LTDC_GCR_HSPOL /*!< Horizontal Synchronization is active high. */
\r
229 /** @defgroup LTDC_VS_POLARITY LTDC VS POLARITY
\r
232 #define LTDC_VSPOLARITY_AL ((uint32_t)0x00000000) /*!< Vertical Synchronization is active low. */
\r
233 #define LTDC_VSPOLARITY_AH LTDC_GCR_VSPOL /*!< Vertical Synchronization is active high. */
\r
238 /** @defgroup LTDC_DE_POLARITY LTDC DE POLARITY
\r
241 #define LTDC_DEPOLARITY_AL ((uint32_t)0x00000000) /*!< Data Enable, is active low. */
\r
242 #define LTDC_DEPOLARITY_AH LTDC_GCR_DEPOL /*!< Data Enable, is active high. */
\r
247 /** @defgroup LTDC_PC_POLARITY LTDC PC POLARITY
\r
250 #define LTDC_PCPOLARITY_IPC ((uint32_t)0x00000000) /*!< input pixel clock. */
\r
251 #define LTDC_PCPOLARITY_IIPC LTDC_GCR_PCPOL /*!< inverted input pixel clock. */
\r
256 /** @defgroup LTDC_SYNC LTDC SYNC
\r
259 #define LTDC_HORIZONTALSYNC (LTDC_SSCR_HSW >> 16) /*!< Horizontal synchronization width. */
\r
260 #define LTDC_VERTICALSYNC LTDC_SSCR_VSH /*!< Vertical synchronization height. */
\r
265 /** @defgroup LTDC_BACK_COLOR LTDC BACK COLOR
\r
268 #define LTDC_COLOR ((uint32_t)0x000000FF) /*!< Color mask */
\r
273 /** @defgroup LTDC_BlendingFactor1 LTDC Blending Factor1
\r
276 #define LTDC_BLENDING_FACTOR1_CA ((uint32_t)0x00000400) /*!< Blending factor : Cte Alpha */
\r
277 #define LTDC_BLENDING_FACTOR1_PAxCA ((uint32_t)0x00000600) /*!< Blending factor : Cte Alpha x Pixel Alpha*/
\r
282 /** @defgroup LTDC_BlendingFactor2 LTDC Blending Factor2
\r
285 #define LTDC_BLENDING_FACTOR2_CA ((uint32_t)0x00000005) /*!< Blending factor : Cte Alpha */
\r
286 #define LTDC_BLENDING_FACTOR2_PAxCA ((uint32_t)0x00000007) /*!< Blending factor : Cte Alpha x Pixel Alpha*/
\r
291 /** @defgroup LTDC_Pixelformat LTDC Pixel format
\r
294 #define LTDC_PIXEL_FORMAT_ARGB8888 ((uint32_t)0x00000000) /*!< ARGB8888 LTDC pixel format */
\r
295 #define LTDC_PIXEL_FORMAT_RGB888 ((uint32_t)0x00000001) /*!< RGB888 LTDC pixel format */
\r
296 #define LTDC_PIXEL_FORMAT_RGB565 ((uint32_t)0x00000002) /*!< RGB565 LTDC pixel format */
\r
297 #define LTDC_PIXEL_FORMAT_ARGB1555 ((uint32_t)0x00000003) /*!< ARGB1555 LTDC pixel format */
\r
298 #define LTDC_PIXEL_FORMAT_ARGB4444 ((uint32_t)0x00000004) /*!< ARGB4444 LTDC pixel format */
\r
299 #define LTDC_PIXEL_FORMAT_L8 ((uint32_t)0x00000005) /*!< L8 LTDC pixel format */
\r
300 #define LTDC_PIXEL_FORMAT_AL44 ((uint32_t)0x00000006) /*!< AL44 LTDC pixel format */
\r
301 #define LTDC_PIXEL_FORMAT_AL88 ((uint32_t)0x00000007) /*!< AL88 LTDC pixel format */
\r
306 /** @defgroup LTDC_Alpha LTDC Alpha
\r
309 #define LTDC_ALPHA LTDC_LxCACR_CONSTA /*!< LTDC Cte Alpha mask */
\r
314 /** @defgroup LTDC_LAYER_Config LTDC LAYER Config
\r
317 #define LTDC_STOPPOSITION (LTDC_LxWHPCR_WHSPPOS >> 16) /*!< LTDC Layer stop position */
\r
318 #define LTDC_STARTPOSITION LTDC_LxWHPCR_WHSTPOS /*!< LTDC Layer start position */
\r
320 #define LTDC_COLOR_FRAME_BUFFER LTDC_LxCFBLR_CFBLL /*!< LTDC Layer Line length */
\r
321 #define LTDC_LINE_NUMBER LTDC_LxCFBLNR_CFBLNBR /*!< LTDC Layer Line number */
\r
326 /** @defgroup LTDC_Interrupts LTDC Interrupts
\r
329 #define LTDC_IT_LI LTDC_IER_LIE
\r
330 #define LTDC_IT_FU LTDC_IER_FUIE
\r
331 #define LTDC_IT_TE LTDC_IER_TERRIE
\r
332 #define LTDC_IT_RR LTDC_IER_RRIE
\r
337 /** @defgroup LTDC_Flag LTDC Flag
\r
340 #define LTDC_FLAG_LI LTDC_ISR_LIF
\r
341 #define LTDC_FLAG_FU LTDC_ISR_FUIF
\r
342 #define LTDC_FLAG_TE LTDC_ISR_TERRIF
\r
343 #define LTDC_FLAG_RR LTDC_ISR_RRIF
\r
352 /* Exported macro ------------------------------------------------------------*/
\r
353 /** @defgroup LTDC_Exported_Macros LTDC Exported Macros
\r
357 /** @brief Reset LTDC handle state
\r
358 * @param __HANDLE__: specifies the LTDC handle.
\r
361 #define __HAL_LTDC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_LTDC_STATE_RESET)
\r
364 * @brief Enable the LTDC.
\r
365 * @param __HANDLE__: LTDC handle
\r
368 #define __HAL_LTDC_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->GCR |= LTDC_GCR_LTDCEN)
\r
371 * @brief Disable the LTDC.
\r
372 * @param __HANDLE__: LTDC handle
\r
375 #define __HAL_LTDC_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->GCR &= ~(LTDC_GCR_LTDCEN))
\r
378 * @brief Enable the LTDC Layer.
\r
379 * @param __HANDLE__: LTDC handle
\r
380 * @param __LAYER__: Specify the layer to be enabled
\r
381 * This parameter can be 0 or 1
\r
384 #define __HAL_LTDC_LAYER_ENABLE(__HANDLE__, __LAYER__) ((LTDC_LAYER((__HANDLE__), (__LAYER__)))->CR |= (uint32_t)LTDC_LxCR_LEN)
\r
387 * @brief Disable the LTDC Layer.
\r
388 * @param __HANDLE__: LTDC handle
\r
389 * @param __LAYER__: Specify the layer to be disabled
\r
390 * This parameter can be 0 or 1
\r
393 #define __HAL_LTDC_LAYER_DISABLE(__HANDLE__, __LAYER__) ((LTDC_LAYER((__HANDLE__), (__LAYER__)))->CR &= ~(uint32_t)LTDC_LxCR_LEN)
\r
396 * @brief Reload Layer Configuration.
\r
397 * @param __HANDLE__: LTDC handle
\r
400 #define __HAL_LTDC_RELOAD_CONFIG(__HANDLE__) ((__HANDLE__)->Instance->SRCR |= LTDC_SRCR_IMR)
\r
402 /* Interrupt & Flag management */
\r
404 * @brief Get the LTDC pending flags.
\r
405 * @param __HANDLE__: LTDC handle
\r
406 * @param __FLAG__: Get the specified flag.
\r
407 * This parameter can be any combination of the following values:
\r
408 * @arg LTDC_FLAG_LI: Line Interrupt flag
\r
409 * @arg LTDC_FLAG_FU: FIFO Underrun Interrupt flag
\r
410 * @arg LTDC_FLAG_TE: Transfer Error interrupt flag
\r
411 * @arg LTDC_FLAG_RR: Register Reload Interrupt Flag
\r
412 * @retval The state of FLAG (SET or RESET).
\r
414 #define __HAL_LTDC_GET_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR & (__FLAG__))
\r
417 * @brief Clears the LTDC pending flags.
\r
418 * @param __HANDLE__: LTDC handle
\r
419 * @param __FLAG__: specifies the flag to clear.
\r
420 * This parameter can be any combination of the following values:
\r
421 * @arg LTDC_FLAG_LI: Line Interrupt flag
\r
422 * @arg LTDC_FLAG_FU: FIFO Underrun Interrupt flag
\r
423 * @arg LTDC_FLAG_TE: Transfer Error interrupt flag
\r
424 * @arg LTDC_FLAG_RR: Register Reload Interrupt Flag
\r
427 #define __HAL_LTDC_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = (__FLAG__))
\r
430 * @brief Enables the specified LTDC interrupts.
\r
431 * @param __HANDLE__: LTDC handle
\r
432 * @param __INTERRUPT__: specifies the LTDC interrupt sources to be enabled.
\r
433 * This parameter can be any combination of the following values:
\r
434 * @arg LTDC_IT_LI: Line Interrupt flag
\r
435 * @arg LTDC_IT_FU: FIFO Underrun Interrupt flag
\r
436 * @arg LTDC_IT_TE: Transfer Error interrupt flag
\r
437 * @arg LTDC_IT_RR: Register Reload Interrupt Flag
\r
440 #define __HAL_LTDC_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER |= (__INTERRUPT__))
\r
443 * @brief Disables the specified LTDC interrupts.
\r
444 * @param __HANDLE__: LTDC handle
\r
445 * @param __INTERRUPT__: specifies the LTDC interrupt sources to be disabled.
\r
446 * This parameter can be any combination of the following values:
\r
447 * @arg LTDC_IT_LI: Line Interrupt flag
\r
448 * @arg LTDC_IT_FU: FIFO Underrun Interrupt flag
\r
449 * @arg LTDC_IT_TE: Transfer Error interrupt flag
\r
450 * @arg LTDC_IT_RR: Register Reload Interrupt Flag
\r
453 #define __HAL_LTDC_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER &= ~(__INTERRUPT__))
\r
456 * @brief Checks whether the specified LTDC interrupt has occurred or not.
\r
457 * @param __HANDLE__: LTDC handle
\r
458 * @param __INTERRUPT__: specifies the LTDC interrupt source to check.
\r
459 * This parameter can be one of the following values:
\r
460 * @arg LTDC_IT_LI: Line Interrupt flag
\r
461 * @arg LTDC_IT_FU: FIFO Underrun Interrupt flag
\r
462 * @arg LTDC_IT_TE: Transfer Error interrupt flag
\r
463 * @arg LTDC_IT_RR: Register Reload Interrupt Flag
\r
464 * @retval The state of INTERRUPT (SET or RESET).
\r
466 #define __HAL_LTDC_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->ISR & (__INTERRUPT__))
\r
471 /* Exported functions --------------------------------------------------------*/
\r
472 /** @addtogroup LTDC_Exported_Functions
\r
475 /** @addtogroup LTDC_Exported_Functions_Group1
\r
478 /* Initialization and de-initialization functions *****************************/
\r
479 HAL_StatusTypeDef HAL_LTDC_Init(LTDC_HandleTypeDef *hltdc);
\r
480 HAL_StatusTypeDef HAL_LTDC_DeInit(LTDC_HandleTypeDef *hltdc);
\r
481 void HAL_LTDC_MspInit(LTDC_HandleTypeDef* hltdc);
\r
482 void HAL_LTDC_MspDeInit(LTDC_HandleTypeDef* hltdc);
\r
483 void HAL_LTDC_ErrorCallback(LTDC_HandleTypeDef *hltdc);
\r
484 void HAL_LTDC_LineEvenCallback(LTDC_HandleTypeDef *hltdc);
\r
489 /** @addtogroup LTDC_Exported_Functions_Group2
\r
492 /* IO operation functions *****************************************************/
\r
493 void HAL_LTDC_IRQHandler(LTDC_HandleTypeDef *hltdc);
\r
498 /** @addtogroup LTDC_Exported_Functions_Group3
\r
501 /* Peripheral Control functions ***********************************************/
\r
502 HAL_StatusTypeDef HAL_LTDC_ConfigLayer(LTDC_HandleTypeDef *hltdc, LTDC_LayerCfgTypeDef *pLayerCfg, uint32_t LayerIdx);
\r
503 HAL_StatusTypeDef HAL_LTDC_SetWindowSize(LTDC_HandleTypeDef *hltdc, uint32_t XSize, uint32_t YSize, uint32_t LayerIdx);
\r
504 HAL_StatusTypeDef HAL_LTDC_SetWindowPosition(LTDC_HandleTypeDef *hltdc, uint32_t X0, uint32_t Y0, uint32_t LayerIdx);
\r
505 HAL_StatusTypeDef HAL_LTDC_SetPixelFormat(LTDC_HandleTypeDef *hltdc, uint32_t Pixelformat, uint32_t LayerIdx);
\r
506 HAL_StatusTypeDef HAL_LTDC_SetAlpha(LTDC_HandleTypeDef *hltdc, uint32_t Alpha, uint32_t LayerIdx);
\r
507 HAL_StatusTypeDef HAL_LTDC_SetAddress(LTDC_HandleTypeDef *hltdc, uint32_t Address, uint32_t LayerIdx);
\r
508 HAL_StatusTypeDef HAL_LTDC_ConfigColorKeying(LTDC_HandleTypeDef *hltdc, uint32_t RGBValue, uint32_t LayerIdx);
\r
509 HAL_StatusTypeDef HAL_LTDC_ConfigCLUT(LTDC_HandleTypeDef *hltdc, uint32_t *pCLUT, uint32_t CLUTSize, uint32_t LayerIdx);
\r
510 HAL_StatusTypeDef HAL_LTDC_EnableColorKeying(LTDC_HandleTypeDef *hltdc, uint32_t LayerIdx);
\r
511 HAL_StatusTypeDef HAL_LTDC_DisableColorKeying(LTDC_HandleTypeDef *hltdc, uint32_t LayerIdx);
\r
512 HAL_StatusTypeDef HAL_LTDC_EnableCLUT(LTDC_HandleTypeDef *hltdc, uint32_t LayerIdx);
\r
513 HAL_StatusTypeDef HAL_LTDC_DisableCLUT(LTDC_HandleTypeDef *hltdc, uint32_t LayerIdx);
\r
514 HAL_StatusTypeDef HAL_LTDC_ProgramLineEvent(LTDC_HandleTypeDef *hltdc, uint32_t Line);
\r
515 HAL_StatusTypeDef HAL_LTDC_EnableDither(LTDC_HandleTypeDef *hltdc);
\r
516 HAL_StatusTypeDef HAL_LTDC_DisableDither(LTDC_HandleTypeDef *hltdc);
\r
521 /** @addtogroup LTDC_Exported_Functions_Group4
\r
524 /* Peripheral State functions *************************************************/
\r
525 HAL_LTDC_StateTypeDef HAL_LTDC_GetState(LTDC_HandleTypeDef *hltdc);
\r
526 uint32_t HAL_LTDC_GetError(LTDC_HandleTypeDef *hltdc);
\r
534 /* Private types -------------------------------------------------------------*/
\r
535 /** @defgroup LTDC_Private_Types LTDC Private Types
\r
543 /* Private variables ---------------------------------------------------------*/
\r
544 /** @defgroup LTDC_Private_Variables LTDC Private Variables
\r
552 /* Private constants ---------------------------------------------------------*/
\r
553 /** @defgroup LTDC_Private_Constants LTDC Private Constants
\r
561 /* Private macros ------------------------------------------------------------*/
\r
562 /** @defgroup LTDC_Private_Macros LTDC Private Macros
\r
565 #define LTDC_LAYER(__HANDLE__, __LAYER__) ((LTDC_Layer_TypeDef *)((uint32_t)(((uint32_t)((__HANDLE__)->Instance)) + 0x84 + (0x80*(__LAYER__)))))
\r
566 #define IS_LTDC_LAYER(LAYER) ((LAYER) <= MAX_LAYER)
\r
567 #define IS_LTDC_HSPOL(HSPOL) (((HSPOL) == LTDC_HSPOLARITY_AL) || \
\r
568 ((HSPOL) == LTDC_HSPOLARITY_AH))
\r
569 #define IS_LTDC_VSPOL(VSPOL) (((VSPOL) == LTDC_VSPOLARITY_AL) || \
\r
570 ((VSPOL) == LTDC_VSPOLARITY_AH))
\r
571 #define IS_LTDC_DEPOL(DEPOL) (((DEPOL) == LTDC_DEPOLARITY_AL) || \
\r
572 ((DEPOL) == LTDC_DEPOLARITY_AH))
\r
573 #define IS_LTDC_PCPOL(PCPOL) (((PCPOL) == LTDC_PCPOLARITY_IPC) || \
\r
574 ((PCPOL) == LTDC_PCPOLARITY_IIPC))
\r
575 #define IS_LTDC_HSYNC(HSYNC) ((HSYNC) <= LTDC_HORIZONTALSYNC)
\r
576 #define IS_LTDC_VSYNC(VSYNC) ((VSYNC) <= LTDC_VERTICALSYNC)
\r
577 #define IS_LTDC_AHBP(AHBP) ((AHBP) <= LTDC_HORIZONTALSYNC)
\r
578 #define IS_LTDC_AVBP(AVBP) ((AVBP) <= LTDC_VERTICALSYNC)
\r
579 #define IS_LTDC_AAW(AAW) ((AAW) <= LTDC_HORIZONTALSYNC)
\r
580 #define IS_LTDC_AAH(AAH) ((AAH) <= LTDC_VERTICALSYNC)
\r
581 #define IS_LTDC_TOTALW(TOTALW) ((TOTALW) <= LTDC_HORIZONTALSYNC)
\r
582 #define IS_LTDC_TOTALH(TOTALH) ((TOTALH) <= LTDC_VERTICALSYNC)
\r
583 #define IS_LTDC_BLUEVALUE(BBLUE) ((BBLUE) <= LTDC_COLOR)
\r
584 #define IS_LTDC_GREENVALUE(BGREEN) ((BGREEN) <= LTDC_COLOR)
\r
585 #define IS_LTDC_REDVALUE(BRED) ((BRED) <= LTDC_COLOR)
\r
586 #define IS_LTDC_BLENDING_FACTOR1(BlendingFactor1) (((BlendingFactor1) == LTDC_BLENDING_FACTOR1_CA) || \
\r
587 ((BlendingFactor1) == LTDC_BLENDING_FACTOR1_PAxCA))
\r
588 #define IS_LTDC_BLENDING_FACTOR2(BlendingFactor2) (((BlendingFactor2) == LTDC_BLENDING_FACTOR2_CA) || \
\r
589 ((BlendingFactor2) == LTDC_BLENDING_FACTOR2_PAxCA))
\r
590 #define IS_LTDC_PIXEL_FORMAT(Pixelformat) (((Pixelformat) == LTDC_PIXEL_FORMAT_ARGB8888) || ((Pixelformat) == LTDC_PIXEL_FORMAT_RGB888) || \
\r
591 ((Pixelformat) == LTDC_PIXEL_FORMAT_RGB565) || ((Pixelformat) == LTDC_PIXEL_FORMAT_ARGB1555) || \
\r
592 ((Pixelformat) == LTDC_PIXEL_FORMAT_ARGB4444) || ((Pixelformat) == LTDC_PIXEL_FORMAT_L8) || \
\r
593 ((Pixelformat) == LTDC_PIXEL_FORMAT_AL44) || ((Pixelformat) == LTDC_PIXEL_FORMAT_AL88))
\r
594 #define IS_LTDC_ALPHA(ALPHA) ((ALPHA) <= LTDC_ALPHA)
\r
595 #define IS_LTDC_HCONFIGST(HCONFIGST) ((HCONFIGST) <= LTDC_STARTPOSITION)
\r
596 #define IS_LTDC_HCONFIGSP(HCONFIGSP) ((HCONFIGSP) <= LTDC_STOPPOSITION)
\r
597 #define IS_LTDC_VCONFIGST(VCONFIGST) ((VCONFIGST) <= LTDC_STARTPOSITION)
\r
598 #define IS_LTDC_VCONFIGSP(VCONFIGSP) ((VCONFIGSP) <= LTDC_STOPPOSITION)
\r
599 #define IS_LTDC_CFBP(CFBP) ((CFBP) <= LTDC_COLOR_FRAME_BUFFER)
\r
600 #define IS_LTDC_CFBLL(CFBLL) ((CFBLL) <= LTDC_COLOR_FRAME_BUFFER)
\r
601 #define IS_LTDC_CFBLNBR(CFBLNBR) ((CFBLNBR) <= LTDC_LINE_NUMBER)
\r
602 #define IS_LTDC_LIPOS(LIPOS) ((LIPOS) <= 0x7FF)
\r
607 /* Private functions ---------------------------------------------------------*/
\r
608 /** @defgroup LTDC_Private_Functions LTDC Private Functions
\r
619 #endif /* STM32F756xx || STM32F746xx */
\r
628 #endif /* __STM32F7xx_HAL_LTDC_H */
\r
630 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
\r