Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
Kojto
Date:
Wed Nov 25 13:21:40 2015 +0000
Revision:
110:165afa46840b
Parent:
106:ba1f97679dad
Release 110  of the mbed library

Changes:
- new platforms - STM32F410R, DISCO_F429ZI, DISCO_F469NI
- Nucleo L476 - gcc and uvision template
- k22,k64f targets - ADC channels A addition
- EFM32 - bugfixes in sleep, serial and spi
- Delta DFCM NNN40 - pinnames update

Who changed what in which revision?

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