/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/adc/fsl_adc_hal.h substitute line 894 extern } by }

Fork of mbed by mbed official

Committer:
bogdanm
Date:
Wed Jul 02 13:22:23 2014 +0100
Revision:
86:04dd9b1680ae
Release 86 of the mbed library

Main changes:


- bug fixes in various backends
- mbed "error" replaced by assert logic (mbed_assert)
- new ST Nucleo targets

Who changed what in which revision?

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