mbed official / mbed

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

Committer:
Kojto
Date:
Tue Mar 15 14:34:00 2016 +0000
Revision:
116:c0f6e94411f5
Parent:
107:4f6c30876dfa
Child:
122:f9eeca106725
Release 116 of the mbed library

Changes:
- new targets - NUCLEO_L073RZ
- fixes to IOTSS BEID platform
- LPC824, LPC1549 and LPC11U68 - fix PWMOut SCT bugs
- STM32F7 - Cube driver
- STM32F4 - add RTC LSI macro, defined as 0
- STM32F3 - fix multiple ADC clock initialization
- retarget - binary mode fix for GCC

Who changed what in which revision?

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