mbed official / mbed

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

Committer:
Kojto
Date:
Thu Jul 07 14:34:11 2016 +0100
Revision:
122:f9eeca106725
Parent:
116:c0f6e94411f5
Release 122 of the mbed library

Changes:
- new targets - Nucleo L432KC, Beetle, Nucleo F446ZE, Nucleo L011K4
- Thread safety addition - mbed API should contain a statement about thread safety
- critical section API addition
- CAS API (core_util_atomic_incr/decr)
- DEVICE_ are generated from targets.json file, device.h deprecated
- Callback replaces FunctionPointer to provide std like interface
- mbed HAL API docs improvements
- toolchain - prexif attributes with MBED_
- add new attributes - packed, weak, forcedinline, align
- target.json - contains targets definitions
- ST - L1XX - Cube update to 1.5
- SPI clock selection fix (clock from APB domain)
- F7 - Cube update v1.4.0
- L0 - baudrate init fix
- L1 - Cube update v1.5
- F3 - baudrate init fix, 3 targets CAN support
- F4 - Cube update v1.12.0, 3 targets CAN support
- L4XX - Cube update v1.5.1
- F0 - update Cube to v1.5.0
- L4 - 2 targets (L476RG/VG) CAN support
- NXP - pwm clock fix for KSDK2 MCU
- LPC2368 - remove ARM toolchain support - due to regression
- KSDK2 - fix SPI , I2C address and repeat start
- Silabs - some fixes backported from mbed 3
- Renesas - RZ_A1H - SystemCoreClockUpdate addition

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