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