mbed w/ spi bug fig

Dependents:   display-puck

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Fri Jun 27 07:30:09 2014 +0100
Revision:
242:7074e42da0b2
Parent:
133:d4dda5c437f0
Synchronized with git revision 124ef5e3add9e74a3221347a3fbeea7c8b3cf353

Full URL: https://github.com/mbedmicro/mbed/commit/124ef5e3add9e74a3221347a3fbeea7c8b3cf353/

[DISCO_F407VG] HAL update.

Who changed what in which revision?

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