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