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