STM32F469NI Discovery board drivers

Dependents:   DISCO-F469NI_LCDTS_GUI_demo Configurable_Robots DISCO-F469NI_LCD_demo DISCO-F469NI_SD_demo ... more

Committer:
aa6164
Date:
Wed Jun 09 12:45:23 2021 +0000
Revision:
4:27609b3a44ed
Parent:
3:3cdfcc4f7c9d
Updated wait_ms() to thread_sleep_for() for Mbed OS 6+

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Jerome Coutant 2:123b894b49dd 1 /**
Jerome Coutant 2:123b894b49dd 2 ******************************************************************************
Jerome Coutant 2:123b894b49dd 3 * @file stm32469i_discovery_lcd.h
Jerome Coutant 2:123b894b49dd 4 * @author MCD Application Team
Jerome Coutant 2:123b894b49dd 5 * @brief This file contains the common defines and functions prototypes for
Jerome Coutant 2:123b894b49dd 6 * the stm32469i_discovery_lcd.c driver.
Jerome Coutant 2:123b894b49dd 7 ******************************************************************************
Jerome Coutant 2:123b894b49dd 8 * @attention
Jerome Coutant 2:123b894b49dd 9 *
Jerome Coutant 2:123b894b49dd 10 * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
Jerome Coutant 2:123b894b49dd 11 *
Jerome Coutant 2:123b894b49dd 12 * Redistribution and use in source and binary forms, with or without modification,
Jerome Coutant 2:123b894b49dd 13 * are permitted provided that the following conditions are met:
Jerome Coutant 2:123b894b49dd 14 * 1. Redistributions of source code must retain the above copyright notice,
Jerome Coutant 2:123b894b49dd 15 * this list of conditions and the following disclaimer.
Jerome Coutant 2:123b894b49dd 16 * 2. Redistributions in binary form must reproduce the above copyright notice,
Jerome Coutant 2:123b894b49dd 17 * this list of conditions and the following disclaimer in the documentation
Jerome Coutant 2:123b894b49dd 18 * and/or other materials provided with the distribution.
Jerome Coutant 2:123b894b49dd 19 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Jerome Coutant 2:123b894b49dd 20 * may be used to endorse or promote products derived from this software
Jerome Coutant 2:123b894b49dd 21 * without specific prior written permission.
Jerome Coutant 2:123b894b49dd 22 *
Jerome Coutant 2:123b894b49dd 23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Jerome Coutant 2:123b894b49dd 24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Jerome Coutant 2:123b894b49dd 25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Jerome Coutant 2:123b894b49dd 26 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Jerome Coutant 2:123b894b49dd 27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Jerome Coutant 2:123b894b49dd 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Jerome Coutant 2:123b894b49dd 29 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Jerome Coutant 2:123b894b49dd 30 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Jerome Coutant 2:123b894b49dd 31 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Jerome Coutant 2:123b894b49dd 32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Jerome Coutant 2:123b894b49dd 33 *
Jerome Coutant 2:123b894b49dd 34 ******************************************************************************
Jerome Coutant 2:123b894b49dd 35 */
Jerome Coutant 2:123b894b49dd 36
Jerome Coutant 2:123b894b49dd 37 /* Define to prevent recursive inclusion -------------------------------------*/
Jerome Coutant 2:123b894b49dd 38 #ifndef __STM32469I_DISCOVERY_LCD_H
Jerome Coutant 2:123b894b49dd 39 #define __STM32469I_DISCOVERY_LCD_H
Jerome Coutant 2:123b894b49dd 40
Jerome Coutant 2:123b894b49dd 41 #ifdef __cplusplus
Jerome Coutant 2:123b894b49dd 42 extern "C" {
Jerome Coutant 2:123b894b49dd 43 #endif
Jerome Coutant 2:123b894b49dd 44
Jerome Coutant 2:123b894b49dd 45 /* Includes ------------------------------------------------------------------*/
Jerome Coutant 2:123b894b49dd 46 /* Include LCD component Driver */
Jerome Coutant 2:123b894b49dd 47
Jerome Coutant 2:123b894b49dd 48 /* Include OTM8009A LCD Driver IC driver code */
Jerome Coutant 2:123b894b49dd 49 #include "../Components/otm8009a/otm8009a.h"
Jerome Coutant 2:123b894b49dd 50
Jerome Coutant 2:123b894b49dd 51 /* Include SDRAM Driver */
Jerome Coutant 2:123b894b49dd 52 #include "stm32469i_discovery_sdram.h"
Jerome Coutant 2:123b894b49dd 53 #include "stm32469i_discovery.h"
Jerome Coutant 2:123b894b49dd 54 #include "../Fonts/fonts.h"
Jerome Coutant 2:123b894b49dd 55
Jerome Coutant 2:123b894b49dd 56 #include <string.h> /* use of memset() */
Jerome Coutant 2:123b894b49dd 57
Jerome Coutant 2:123b894b49dd 58 /** @addtogroup BSP
Jerome Coutant 2:123b894b49dd 59 * @{
Jerome Coutant 2:123b894b49dd 60 */
Jerome Coutant 2:123b894b49dd 61
Jerome Coutant 2:123b894b49dd 62 /** @addtogroup STM32469I_Discovery
Jerome Coutant 2:123b894b49dd 63 * @{
Jerome Coutant 2:123b894b49dd 64 */
Jerome Coutant 2:123b894b49dd 65
Jerome Coutant 2:123b894b49dd 66 /** @addtogroup STM32469I-Discovery_LCD
Jerome Coutant 2:123b894b49dd 67 * @{
Jerome Coutant 2:123b894b49dd 68 */
Jerome Coutant 2:123b894b49dd 69
Jerome Coutant 2:123b894b49dd 70 /** @defgroup STM32469I-Discovery_LCD_Exported_Constants STM32469I Discovery LCD Exported Constants
Jerome Coutant 2:123b894b49dd 71 * @{
Jerome Coutant 2:123b894b49dd 72 */
Jerome Coutant 2:123b894b49dd 73
Jerome Coutant 2:123b894b49dd 74 #define LCD_LayerCfgTypeDef LTDC_LayerCfgTypeDef
Jerome Coutant 2:123b894b49dd 75 /**
Jerome Coutant 2:123b894b49dd 76 * @brief LCD FB_StartAddress
Jerome Coutant 2:123b894b49dd 77 */
Jerome Coutant 2:123b894b49dd 78 #define LCD_FB_START_ADDRESS ((uint32_t)0xC0000000)
Jerome Coutant 2:123b894b49dd 79
Jerome Coutant 2:123b894b49dd 80 /** @brief Maximum number of LTDC layers
Jerome Coutant 2:123b894b49dd 81 */
Jerome Coutant 2:123b894b49dd 82 #define LTDC_MAX_LAYER_NUMBER ((uint32_t) 2)
Jerome Coutant 2:123b894b49dd 83
Jerome Coutant 2:123b894b49dd 84 /** @brief LTDC Background layer index
Jerome Coutant 2:123b894b49dd 85 */
Jerome Coutant 2:123b894b49dd 86 #define LTDC_ACTIVE_LAYER_BACKGROUND ((uint32_t) 0)
Jerome Coutant 2:123b894b49dd 87
Jerome Coutant 2:123b894b49dd 88 /** @brief LTDC Foreground layer index
Jerome Coutant 2:123b894b49dd 89 */
Jerome Coutant 2:123b894b49dd 90 #define LTDC_ACTIVE_LAYER_FOREGROUND ((uint32_t) 1)
Jerome Coutant 2:123b894b49dd 91
Jerome Coutant 2:123b894b49dd 92 /** @brief Number of LTDC layers
Jerome Coutant 2:123b894b49dd 93 */
Jerome Coutant 2:123b894b49dd 94 #define LTDC_NB_OF_LAYERS ((uint32_t) 2)
Jerome Coutant 2:123b894b49dd 95
Jerome Coutant 2:123b894b49dd 96 /** @brief LTDC Default used layer index
Jerome Coutant 2:123b894b49dd 97 */
Jerome Coutant 2:123b894b49dd 98 #define LTDC_DEFAULT_ACTIVE_LAYER LTDC_ACTIVE_LAYER_FOREGROUND
Jerome Coutant 2:123b894b49dd 99
Jerome Coutant 2:123b894b49dd 100 /**
Jerome Coutant 2:123b894b49dd 101 * @brief LCD status structure definition
Jerome Coutant 2:123b894b49dd 102 */
Jerome Coutant 2:123b894b49dd 103 #define LCD_OK 0x00
Jerome Coutant 2:123b894b49dd 104 #define LCD_ERROR 0x01
Jerome Coutant 2:123b894b49dd 105 #define LCD_TIMEOUT 0x02
Jerome Coutant 2:123b894b49dd 106
Jerome Coutant 2:123b894b49dd 107 /**
Jerome Coutant 2:123b894b49dd 108 * @brief LCD Display OTM8009A ID
Jerome Coutant 2:123b894b49dd 109 */
Jerome Coutant 2:123b894b49dd 110 #define LCD_OTM8009A_ID ((uint32_t) 0)
Jerome Coutant 2:123b894b49dd 111
Jerome Coutant 2:123b894b49dd 112 /**
Jerome Coutant 2:123b894b49dd 113 * @brief LCD color definitions values
Jerome Coutant 2:123b894b49dd 114 * in ARGB8888 format.
Jerome Coutant 2:123b894b49dd 115 */
Jerome Coutant 2:123b894b49dd 116
Jerome Coutant 2:123b894b49dd 117 /** @brief Blue value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 118 */
Jerome Coutant 2:123b894b49dd 119 #define LCD_COLOR_BLUE ((uint32_t) 0xFF0000FF)
Jerome Coutant 2:123b894b49dd 120
Jerome Coutant 2:123b894b49dd 121 /** @brief Green value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 122 */
Jerome Coutant 2:123b894b49dd 123 #define LCD_COLOR_GREEN ((uint32_t) 0xFF00FF00)
Jerome Coutant 2:123b894b49dd 124
Jerome Coutant 2:123b894b49dd 125 /** @brief Red value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 126 */
Jerome Coutant 2:123b894b49dd 127 #define LCD_COLOR_RED ((uint32_t) 0xFFFF0000)
Jerome Coutant 2:123b894b49dd 128
Jerome Coutant 2:123b894b49dd 129 /** @brief Cyan value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 130 */
Jerome Coutant 2:123b894b49dd 131 #define LCD_COLOR_CYAN ((uint32_t) 0xFF00FFFF)
Jerome Coutant 2:123b894b49dd 132
Jerome Coutant 2:123b894b49dd 133 /** @brief Magenta value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 134 */
Jerome Coutant 2:123b894b49dd 135 #define LCD_COLOR_MAGENTA ((uint32_t) 0xFFFF00FF)
Jerome Coutant 2:123b894b49dd 136
Jerome Coutant 2:123b894b49dd 137 /** @brief Yellow value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 138 */
Jerome Coutant 2:123b894b49dd 139 #define LCD_COLOR_YELLOW ((uint32_t) 0xFFFFFF00)
Jerome Coutant 2:123b894b49dd 140
Jerome Coutant 2:123b894b49dd 141 /** @brief Light Blue value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 142 */
Jerome Coutant 2:123b894b49dd 143 #define LCD_COLOR_LIGHTBLUE ((uint32_t) 0xFF8080FF)
Jerome Coutant 2:123b894b49dd 144
Jerome Coutant 2:123b894b49dd 145 /** @brief Light Green value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 146 */
Jerome Coutant 2:123b894b49dd 147 #define LCD_COLOR_LIGHTGREEN ((uint32_t) 0xFF80FF80)
Jerome Coutant 2:123b894b49dd 148
Jerome Coutant 2:123b894b49dd 149 /** @brief Light Red value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 150 */
Jerome Coutant 2:123b894b49dd 151 #define LCD_COLOR_LIGHTRED ((uint32_t) 0xFFFF8080)
Jerome Coutant 2:123b894b49dd 152
Jerome Coutant 2:123b894b49dd 153 /** @brief Light Cyan value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 154 */
Jerome Coutant 2:123b894b49dd 155 #define LCD_COLOR_LIGHTCYAN ((uint32_t) 0xFF80FFFF)
Jerome Coutant 2:123b894b49dd 156
Jerome Coutant 2:123b894b49dd 157 /** @brief Light Magenta value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 158 */
Jerome Coutant 2:123b894b49dd 159 #define LCD_COLOR_LIGHTMAGENTA ((uint32_t) 0xFFFF80FF)
Jerome Coutant 2:123b894b49dd 160
Jerome Coutant 2:123b894b49dd 161 /** @brief Light Yellow value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 162 */
Jerome Coutant 2:123b894b49dd 163 #define LCD_COLOR_LIGHTYELLOW ((uint32_t) 0xFFFFFF80)
Jerome Coutant 2:123b894b49dd 164
Jerome Coutant 2:123b894b49dd 165 /** @brief Dark Blue value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 166 */
Jerome Coutant 2:123b894b49dd 167 #define LCD_COLOR_DARKBLUE ((uint32_t) 0xFF000080)
Jerome Coutant 2:123b894b49dd 168
Jerome Coutant 2:123b894b49dd 169 /** @brief Light Dark Green value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 170 */
Jerome Coutant 2:123b894b49dd 171 #define LCD_COLOR_DARKGREEN ((uint32_t) 0xFF008000)
Jerome Coutant 2:123b894b49dd 172
Jerome Coutant 2:123b894b49dd 173 /** @brief Light Dark Red value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 174 */
Jerome Coutant 2:123b894b49dd 175 #define LCD_COLOR_DARKRED ((uint32_t) 0xFF800000)
Jerome Coutant 2:123b894b49dd 176
Jerome Coutant 2:123b894b49dd 177 /** @brief Dark Cyan value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 178 */
Jerome Coutant 2:123b894b49dd 179 #define LCD_COLOR_DARKCYAN ((uint32_t) 0xFF008080)
Jerome Coutant 2:123b894b49dd 180
Jerome Coutant 2:123b894b49dd 181 /** @brief Dark Magenta value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 182 */
Jerome Coutant 2:123b894b49dd 183 #define LCD_COLOR_DARKMAGENTA ((uint32_t) 0xFF800080)
Jerome Coutant 2:123b894b49dd 184
Jerome Coutant 2:123b894b49dd 185 /** @brief Dark Yellow value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 186 */
Jerome Coutant 2:123b894b49dd 187 #define LCD_COLOR_DARKYELLOW ((uint32_t) 0xFF808000)
Jerome Coutant 2:123b894b49dd 188
Jerome Coutant 2:123b894b49dd 189 /** @brief White value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 190 */
Jerome Coutant 2:123b894b49dd 191 #define LCD_COLOR_WHITE ((uint32_t) 0xFFFFFFFF)
Jerome Coutant 2:123b894b49dd 192
Jerome Coutant 2:123b894b49dd 193 /** @brief Light Gray value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 194 */
Jerome Coutant 2:123b894b49dd 195 #define LCD_COLOR_LIGHTGRAY ((uint32_t) 0xFFD3D3D3)
Jerome Coutant 2:123b894b49dd 196
Jerome Coutant 2:123b894b49dd 197 /** @brief Gray value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 198 */
Jerome Coutant 2:123b894b49dd 199 #define LCD_COLOR_GRAY ((uint32_t) 0xFF808080)
Jerome Coutant 2:123b894b49dd 200
Jerome Coutant 2:123b894b49dd 201 /** @brief Dark Gray value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 202 */
Jerome Coutant 2:123b894b49dd 203 #define LCD_COLOR_DARKGRAY ((uint32_t) 0xFF404040)
Jerome Coutant 2:123b894b49dd 204
Jerome Coutant 2:123b894b49dd 205 /** @brief Black value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 206 */
Jerome Coutant 2:123b894b49dd 207 #define LCD_COLOR_BLACK ((uint32_t) 0xFF000000)
Jerome Coutant 2:123b894b49dd 208
Jerome Coutant 2:123b894b49dd 209 /** @brief Brown value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 210 */
Jerome Coutant 2:123b894b49dd 211 #define LCD_COLOR_BROWN ((uint32_t) 0xFFA52A2A)
Jerome Coutant 2:123b894b49dd 212
Jerome Coutant 2:123b894b49dd 213 /** @brief Orange value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 214 */
Jerome Coutant 2:123b894b49dd 215 #define LCD_COLOR_ORANGE ((uint32_t) 0xFFFFA500)
Jerome Coutant 2:123b894b49dd 216
Jerome Coutant 2:123b894b49dd 217 /** @brief Transparent value in ARGB8888 format
Jerome Coutant 2:123b894b49dd 218 */
Jerome Coutant 2:123b894b49dd 219 #define LCD_COLOR_TRANSPARENT ((uint32_t) 0xFF000000)
Jerome Coutant 2:123b894b49dd 220
Jerome Coutant 2:123b894b49dd 221 /**
Jerome Coutant 2:123b894b49dd 222 * @brief LCD default font
Jerome Coutant 2:123b894b49dd 223 */
Jerome Coutant 2:123b894b49dd 224 #define LCD_DEFAULT_FONT Font24
Jerome Coutant 2:123b894b49dd 225
Jerome Coutant 2:123b894b49dd 226 /**
Jerome Coutant 2:123b894b49dd 227 * @brief Possible values of
Jerome Coutant 2:123b894b49dd 228 * pixel data format (ie color coding) transmitted on DSI Data lane in DSI packets
Jerome Coutant 2:123b894b49dd 229 */
Jerome Coutant 2:123b894b49dd 230
Jerome Coutant 2:123b894b49dd 231 #define LCD_DSI_PIXEL_DATA_FMT_RBG888 DSI_RGB888 /*!< DSI packet pixel format chosen is RGB888 : 24 bpp */
Jerome Coutant 2:123b894b49dd 232 #define LCD_DSI_PIXEL_DATA_FMT_RBG565 DSI_RGB565 /*!< DSI packet pixel format chosen is RGB565 : 16 bpp */
Jerome Coutant 2:123b894b49dd 233
Jerome Coutant 2:123b894b49dd 234 /**
Jerome Coutant 2:123b894b49dd 235 * @}
Jerome Coutant 2:123b894b49dd 236 */
Jerome Coutant 2:123b894b49dd 237
Jerome Coutant 2:123b894b49dd 238 /** @defgroup STM32469I-Discovery_LCD_Exported_Types STM32469I Discovery LCD Exported Types
Jerome Coutant 2:123b894b49dd 239 * @{
Jerome Coutant 2:123b894b49dd 240 */
Jerome Coutant 2:123b894b49dd 241
Jerome Coutant 2:123b894b49dd 242 /**
Jerome Coutant 2:123b894b49dd 243 * @brief LCD Drawing main properties
Jerome Coutant 2:123b894b49dd 244 */
Jerome Coutant 2:123b894b49dd 245 typedef struct
Jerome Coutant 2:123b894b49dd 246 {
Jerome Coutant 2:123b894b49dd 247 uint32_t TextColor; /*!< Specifies the color of text */
Jerome Coutant 2:123b894b49dd 248 uint32_t BackColor; /*!< Specifies the background color below the text */
Jerome Coutant 2:123b894b49dd 249 sFONT *pFont; /*!< Specifies the font used for the text */
Jerome Coutant 2:123b894b49dd 250
Jerome Coutant 2:123b894b49dd 251 } LCD_DrawPropTypeDef;
Jerome Coutant 2:123b894b49dd 252
Jerome Coutant 2:123b894b49dd 253 /**
Jerome Coutant 2:123b894b49dd 254 * @brief LCD Drawing point (pixel) geometric definition
Jerome Coutant 2:123b894b49dd 255 */
Jerome Coutant 2:123b894b49dd 256 typedef struct
Jerome Coutant 2:123b894b49dd 257 {
Jerome Coutant 2:123b894b49dd 258 int16_t X; /*!< geometric X position of drawing */
Jerome Coutant 2:123b894b49dd 259 int16_t Y; /*!< geometric Y position of drawing */
Jerome Coutant 2:123b894b49dd 260
Jerome Coutant 2:123b894b49dd 261 } Point;
Jerome Coutant 2:123b894b49dd 262
Jerome Coutant 2:123b894b49dd 263 /**
Jerome Coutant 2:123b894b49dd 264 * @brief Pointer on LCD Drawing point (pixel) geometric definition
Jerome Coutant 2:123b894b49dd 265 */
Jerome Coutant 2:123b894b49dd 266 typedef Point * pPoint;
Jerome Coutant 2:123b894b49dd 267
Jerome Coutant 2:123b894b49dd 268 /**
Jerome Coutant 2:123b894b49dd 269 * @brief LCD drawing Line alignment mode definitions
Jerome Coutant 2:123b894b49dd 270 */
Jerome Coutant 2:123b894b49dd 271 typedef enum
Jerome Coutant 2:123b894b49dd 272 {
Jerome Coutant 2:123b894b49dd 273 CENTER_MODE = 0x01, /*!< Center mode */
Jerome Coutant 2:123b894b49dd 274 RIGHT_MODE = 0x02, /*!< Right mode */
Jerome Coutant 2:123b894b49dd 275 LEFT_MODE = 0x03 /*!< Left mode */
Jerome Coutant 2:123b894b49dd 276
Jerome Coutant 2:123b894b49dd 277 } Text_AlignModeTypdef;
Jerome Coutant 2:123b894b49dd 278
Jerome Coutant 2:123b894b49dd 279
Jerome Coutant 2:123b894b49dd 280 /**
Jerome Coutant 2:123b894b49dd 281 * @brief LCD_OrientationTypeDef
Jerome Coutant 2:123b894b49dd 282 * Possible values of Display Orientation
Jerome Coutant 2:123b894b49dd 283 */
Jerome Coutant 2:123b894b49dd 284 typedef enum
Jerome Coutant 2:123b894b49dd 285 {
Jerome Coutant 2:123b894b49dd 286 LCD_ORIENTATION_PORTRAIT = 0x00, /*!< Portrait orientation choice of LCD screen */
Jerome Coutant 2:123b894b49dd 287 LCD_ORIENTATION_LANDSCAPE = 0x01, /*!< Landscape orientation choice of LCD screen */
Jerome Coutant 2:123b894b49dd 288 LCD_ORIENTATION_INVALID = 0x02 /*!< Invalid orientation choice of LCD screen */
Jerome Coutant 2:123b894b49dd 289 } LCD_OrientationTypeDef;
Jerome Coutant 2:123b894b49dd 290
Jerome Coutant 2:123b894b49dd 291 /**
Jerome Coutant 2:123b894b49dd 292 * @}
Jerome Coutant 2:123b894b49dd 293 */
Jerome Coutant 2:123b894b49dd 294
Jerome Coutant 2:123b894b49dd 295 /** @defgroup STM32469I-Discovery_LCD_Exported_Macro STM32469I Discovery LCD Exported Macro
Jerome Coutant 2:123b894b49dd 296 * @{
Jerome Coutant 2:123b894b49dd 297 */
Jerome Coutant 2:123b894b49dd 298
Jerome Coutant 2:123b894b49dd 299 /**
Jerome Coutant 2:123b894b49dd 300 * @}
Jerome Coutant 2:123b894b49dd 301 */
Jerome Coutant 2:123b894b49dd 302
Jerome Coutant 2:123b894b49dd 303 /** @defgroup STM32469I-Discovery_LCD_Exported_Functions STM32469I Discovery LCD Exported Functions
Jerome Coutant 2:123b894b49dd 304 * @{
Jerome Coutant 2:123b894b49dd 305 */
Jerome Coutant 2:123b894b49dd 306 void BSP_LCD_DMA2D_IRQHandler(void);
Jerome Coutant 2:123b894b49dd 307 void BSP_LCD_DSI_IRQHandler(void);
Jerome Coutant 2:123b894b49dd 308 void BSP_LCD_LTDC_IRQHandler(void);
Jerome Coutant 2:123b894b49dd 309 void BSP_LCD_LTDC_ER_IRQHandler(void);
Jerome Coutant 2:123b894b49dd 310
Jerome Coutant 2:123b894b49dd 311 uint8_t BSP_LCD_Init(void);
Jerome Coutant 2:123b894b49dd 312 uint8_t BSP_LCD_InitEx(LCD_OrientationTypeDef orientation);
Jerome Coutant 2:123b894b49dd 313
Jerome Coutant 2:123b894b49dd 314 void BSP_LCD_MspDeInit(void);
Jerome Coutant 2:123b894b49dd 315 void BSP_LCD_MspInit(void);
Jerome Coutant 2:123b894b49dd 316 void BSP_LCD_Reset(void);
Jerome Coutant 2:123b894b49dd 317
Jerome Coutant 2:123b894b49dd 318 uint32_t BSP_LCD_GetXSize(void);
Jerome Coutant 2:123b894b49dd 319 uint32_t BSP_LCD_GetYSize(void);
Jerome Coutant 2:123b894b49dd 320 void BSP_LCD_SetXSize(uint32_t imageWidthPixels);
Jerome Coutant 2:123b894b49dd 321 void BSP_LCD_SetYSize(uint32_t imageHeightPixels);
Jerome Coutant 2:123b894b49dd 322
Jerome Coutant 2:123b894b49dd 323 void BSP_LCD_LayerDefaultInit(uint16_t LayerIndex, uint32_t FB_Address);
Jerome Coutant 2:123b894b49dd 324 void BSP_LCD_SetTransparency(uint32_t LayerIndex, uint8_t Transparency);
Jerome Coutant 2:123b894b49dd 325 void BSP_LCD_SetLayerAddress(uint32_t LayerIndex, uint32_t Address);
Jerome Coutant 2:123b894b49dd 326 void BSP_LCD_SetColorKeying(uint32_t LayerIndex, uint32_t RGBValue);
Jerome Coutant 2:123b894b49dd 327 void BSP_LCD_ResetColorKeying(uint32_t LayerIndex);
Jerome Coutant 2:123b894b49dd 328 void BSP_LCD_SetLayerWindow(uint16_t LayerIndex, uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
Jerome Coutant 2:123b894b49dd 329
Jerome Coutant 2:123b894b49dd 330 void BSP_LCD_SelectLayer(uint32_t LayerIndex);
Jerome Coutant 2:123b894b49dd 331 void BSP_LCD_SetLayerVisible(uint32_t LayerIndex, FunctionalState State);
Jerome Coutant 2:123b894b49dd 332
Jerome Coutant 2:123b894b49dd 333 void BSP_LCD_SetTextColor(uint32_t Color);
Jerome Coutant 2:123b894b49dd 334 uint32_t BSP_LCD_GetTextColor(void);
Jerome Coutant 2:123b894b49dd 335 void BSP_LCD_SetBackColor(uint32_t Color);
Jerome Coutant 2:123b894b49dd 336 uint32_t BSP_LCD_GetBackColor(void);
Jerome Coutant 2:123b894b49dd 337 void BSP_LCD_SetFont(sFONT *fonts);
Jerome Coutant 2:123b894b49dd 338 sFONT *BSP_LCD_GetFont(void);
Jerome Coutant 2:123b894b49dd 339
Jerome Coutant 2:123b894b49dd 340 uint32_t BSP_LCD_ReadPixel(uint16_t Xpos, uint16_t Ypos);
Jerome Coutant 2:123b894b49dd 341 void BSP_LCD_DrawPixel(uint16_t Xpos, uint16_t Ypos, uint32_t pixel);
Jerome Coutant 2:123b894b49dd 342 void BSP_LCD_Clear(uint32_t Color);
Jerome Coutant 2:123b894b49dd 343 void BSP_LCD_ClearStringLine(uint32_t Line);
Jerome Coutant 2:123b894b49dd 344 void BSP_LCD_DisplayStringAtLine(uint16_t Line, uint8_t *ptr);
Jerome Coutant 2:123b894b49dd 345 void BSP_LCD_DisplayStringAt(uint16_t Xpos, uint16_t Ypos, uint8_t *Text, Text_AlignModeTypdef Mode);
Jerome Coutant 2:123b894b49dd 346 void BSP_LCD_DisplayChar(uint16_t Xpos, uint16_t Ypos, uint8_t Ascii);
Jerome Coutant 2:123b894b49dd 347
Jerome Coutant 2:123b894b49dd 348 void BSP_LCD_DrawHLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length);
Jerome Coutant 2:123b894b49dd 349 void BSP_LCD_DrawVLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length);
Jerome Coutant 2:123b894b49dd 350 void BSP_LCD_DrawLine(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2);
Jerome Coutant 2:123b894b49dd 351 void BSP_LCD_DrawRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
Jerome Coutant 2:123b894b49dd 352 void BSP_LCD_DrawCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius);
Jerome Coutant 2:123b894b49dd 353 void BSP_LCD_DrawPolygon(pPoint Points, uint16_t PointCount);
Jerome Coutant 2:123b894b49dd 354 void BSP_LCD_DrawEllipse(int Xpos, int Ypos, int XRadius, int YRadius);
Jerome Coutant 2:123b894b49dd 355 void BSP_LCD_DrawBitmap(uint32_t Xpos, uint32_t Ypos, uint8_t *pbmp);
Jerome Coutant 2:123b894b49dd 356
Jerome Coutant 2:123b894b49dd 357 void BSP_LCD_FillRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
Jerome Coutant 2:123b894b49dd 358 void BSP_LCD_FillCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius);
Jerome Coutant 2:123b894b49dd 359 void BSP_LCD_FillPolygon(pPoint Points, uint16_t PointCount);
Jerome Coutant 2:123b894b49dd 360 void BSP_LCD_FillEllipse(int Xpos, int Ypos, int XRadius, int YRadius);
Jerome Coutant 2:123b894b49dd 361
Jerome Coutant 2:123b894b49dd 362 void BSP_LCD_DisplayOff(void);
Jerome Coutant 2:123b894b49dd 363 void BSP_LCD_DisplayOn(void);
Jerome Coutant 2:123b894b49dd 364
Jerome Coutant 2:123b894b49dd 365 /**
Jerome Coutant 2:123b894b49dd 366 * @}
Jerome Coutant 2:123b894b49dd 367 */
Jerome Coutant 2:123b894b49dd 368
Jerome Coutant 2:123b894b49dd 369 /** @defgroup STM32469I-EVAL_LCD_Exported_Variables STM32469I EVAL LCD Exported Variables
Jerome Coutant 2:123b894b49dd 370 * @{
Jerome Coutant 2:123b894b49dd 371 */
Jerome Coutant 2:123b894b49dd 372
Jerome Coutant 2:123b894b49dd 373 /* @brief DMA2D handle variable */
Jerome Coutant 2:123b894b49dd 374 extern DMA2D_HandleTypeDef hdma2d_eval;
Jerome Coutant 2:123b894b49dd 375
Jerome Coutant 2:123b894b49dd 376 /**
Jerome Coutant 2:123b894b49dd 377 * @}
Jerome Coutant 2:123b894b49dd 378 */
Jerome Coutant 2:123b894b49dd 379
Jerome Coutant 2:123b894b49dd 380 /** @defgroup STM32469I-Discovery_LCD_Exported_Variables STM32469I Discovery LCD Exported Variables
Jerome Coutant 2:123b894b49dd 381 * @{
Jerome Coutant 2:123b894b49dd 382 */
Jerome Coutant 2:123b894b49dd 383
Jerome Coutant 2:123b894b49dd 384 /**
Jerome Coutant 2:123b894b49dd 385 * @}
Jerome Coutant 2:123b894b49dd 386 */
Jerome Coutant 2:123b894b49dd 387
Jerome Coutant 2:123b894b49dd 388 /**
Jerome Coutant 2:123b894b49dd 389 * @}
Jerome Coutant 2:123b894b49dd 390 */
Jerome Coutant 2:123b894b49dd 391
Jerome Coutant 2:123b894b49dd 392 /**
Jerome Coutant 2:123b894b49dd 393 * @}
Jerome Coutant 2:123b894b49dd 394 */
Jerome Coutant 2:123b894b49dd 395
Jerome Coutant 2:123b894b49dd 396 /**
Jerome Coutant 2:123b894b49dd 397 * @}
Jerome Coutant 2:123b894b49dd 398 */
Jerome Coutant 2:123b894b49dd 399
Jerome Coutant 2:123b894b49dd 400 #ifdef __cplusplus
Jerome Coutant 2:123b894b49dd 401 }
Jerome Coutant 2:123b894b49dd 402 #endif
Jerome Coutant 2:123b894b49dd 403
Jerome Coutant 2:123b894b49dd 404 #endif /* __STM32469I_DISCOVERY_LCD_H */
Jerome Coutant 2:123b894b49dd 405
Jerome Coutant 2:123b894b49dd 406 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/