source: asp3_wo_tecs/trunk/arch/arm_m_gcc/stm32f4xx_stm32cube/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_ltdc.h@ 303

Last change on this file since 303 was 303, checked in by ertl-honda, 7 years ago

nucleo_f401re依存部の追加

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