BSP files for STM32H747I-Discovery Copy from ST Cube delivery
Dependents: DISCO_H747I_LCD_demo DISCO_H747I_AUDIO_demo
STM32H747I-Discovery/stm32h747i_discovery_lcd.h@3:bc403474b366, 2019-11-06 (annotated)
- Committer:
- Jerome Coutant
- Date:
- Wed Nov 06 11:32:01 2019 +0100
- Revision:
- 3:bc403474b366
- Parent:
- 0:146cf26a9bbb
Add PDM lib
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jerome Coutant
0:146cf26a9bbb
|
1
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
2
|
******************************************************************************
|
|
Jerome Coutant
0:146cf26a9bbb
|
3
|
* @file stm32h747i_discovery_lcd.h
|
|
Jerome Coutant
0:146cf26a9bbb
|
4
|
* @author MCD Application Team
|
|
Jerome Coutant
0:146cf26a9bbb
|
5
|
* @brief This file contains the common defines and functions prototypes for
|
|
Jerome Coutant
0:146cf26a9bbb
|
6
|
* the stm32h747i_discovery_lcd.c driver.
|
|
Jerome Coutant
0:146cf26a9bbb
|
7
|
******************************************************************************
|
|
Jerome Coutant
0:146cf26a9bbb
|
8
|
* @attention
|
|
Jerome Coutant
0:146cf26a9bbb
|
9
|
*
|
|
Jerome Coutant
0:146cf26a9bbb
|
10
|
* <h2><center>© Copyright (c) 2019 STMicroelectronics.
|
|
Jerome Coutant
0:146cf26a9bbb
|
11
|
* All rights reserved.</center></h2>
|
|
Jerome Coutant
0:146cf26a9bbb
|
12
|
*
|
|
Jerome Coutant
0:146cf26a9bbb
|
13
|
* This software component is licensed by ST under BSD 3-Clause license,
|
|
Jerome Coutant
0:146cf26a9bbb
|
14
|
* the "License"; You may not use this file except in compliance with the
|
|
Jerome Coutant
0:146cf26a9bbb
|
15
|
* License. You may obtain a copy of the License at:
|
|
Jerome Coutant
0:146cf26a9bbb
|
16
|
* opensource.org/licenses/BSD-3-Clause
|
|
Jerome Coutant
0:146cf26a9bbb
|
17
|
*
|
|
Jerome Coutant
0:146cf26a9bbb
|
18
|
******************************************************************************
|
|
Jerome Coutant
0:146cf26a9bbb
|
19
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
20
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
21
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
22
|
#ifndef __STM32H747I_DISCOVERY_LCD_H
|
|
Jerome Coutant
0:146cf26a9bbb
|
23
|
#define __STM32H747I_DISCOVERY_LCD_H
|
|
Jerome Coutant
0:146cf26a9bbb
|
24
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
25
|
#ifdef __cplusplus
|
|
Jerome Coutant
0:146cf26a9bbb
|
26
|
extern "C" {
|
|
Jerome Coutant
0:146cf26a9bbb
|
27
|
#endif
|
|
Jerome Coutant
0:146cf26a9bbb
|
28
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
29
|
/* Includes ------------------------------------------------------------------*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
30
|
/* Include LCD component Driver */
|
|
Jerome Coutant
0:146cf26a9bbb
|
31
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
32
|
/* Include OTM8009A LCD Driver IC driver code */
|
|
Jerome Coutant
0:146cf26a9bbb
|
33
|
#include "../Components/otm8009a/otm8009a.h"
|
|
Jerome Coutant
0:146cf26a9bbb
|
34
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
35
|
#if defined(USE_LCD_HDMI)
|
|
Jerome Coutant
0:146cf26a9bbb
|
36
|
/* Include ADV7533 HDMI Driver IC driver code */
|
|
Jerome Coutant
0:146cf26a9bbb
|
37
|
#include "../Components/adv7533/adv7533.h"
|
|
Jerome Coutant
0:146cf26a9bbb
|
38
|
#endif /* USE_LCD_HDMI */
|
|
Jerome Coutant
0:146cf26a9bbb
|
39
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
40
|
/* Include SDRAM Driver */
|
|
Jerome Coutant
0:146cf26a9bbb
|
41
|
#include "stm32h747i_discovery_sdram.h"
|
|
Jerome Coutant
0:146cf26a9bbb
|
42
|
#include "stm32h747i_discovery.h"
|
|
Jerome Coutant
0:146cf26a9bbb
|
43
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
44
|
#include "../Utilities/Fonts/fonts.h"
|
|
Jerome Coutant
0:146cf26a9bbb
|
45
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
46
|
#include <string.h> /* use of memset() */
|
|
Jerome Coutant
0:146cf26a9bbb
|
47
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
48
|
/** @addtogroup BSP
|
|
Jerome Coutant
0:146cf26a9bbb
|
49
|
* @{
|
|
Jerome Coutant
0:146cf26a9bbb
|
50
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
51
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
52
|
/** @addtogroup STM32H747I_DISCOVERY
|
|
Jerome Coutant
0:146cf26a9bbb
|
53
|
* @{
|
|
Jerome Coutant
0:146cf26a9bbb
|
54
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
55
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
56
|
/** @addtogroup STM32H747I_DISCOVERY_LCD
|
|
Jerome Coutant
0:146cf26a9bbb
|
57
|
* @{
|
|
Jerome Coutant
0:146cf26a9bbb
|
58
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
59
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
60
|
/** @defgroup STM32H747I_DISCOVERY_LCD_Exported_Constants Exported Constants
|
|
Jerome Coutant
0:146cf26a9bbb
|
61
|
* @{
|
|
Jerome Coutant
0:146cf26a9bbb
|
62
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
63
|
#define BSP_LCD_DMA2D_IRQHandler DMA2D_IRQHandler
|
|
Jerome Coutant
0:146cf26a9bbb
|
64
|
#define BSP_LCD_DSI_IRQHandler DSI_IRQHandler
|
|
Jerome Coutant
0:146cf26a9bbb
|
65
|
#define BSP_LCD_LTDC_IRQHandler LTDC_IRQHandler
|
|
Jerome Coutant
0:146cf26a9bbb
|
66
|
#define BSP_LCD_LTDC_ER_IRQHandler LTDC_ER_IRQHandler
|
|
Jerome Coutant
0:146cf26a9bbb
|
67
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
68
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
69
|
#define LCD_LayerCfgTypeDef LTDC_LayerCfgTypeDef
|
|
Jerome Coutant
0:146cf26a9bbb
|
70
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
71
|
* @brief LCD FB_StartAddress
|
|
Jerome Coutant
0:146cf26a9bbb
|
72
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
73
|
#define LCD_FB_START_ADDRESS ((uint32_t)0xD0000000)
|
|
Jerome Coutant
0:146cf26a9bbb
|
74
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
75
|
/** @brief Maximum number of LTDC layers
|
|
Jerome Coutant
0:146cf26a9bbb
|
76
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
77
|
#define LTDC_MAX_LAYER_NUMBER ((uint32_t) 2)
|
|
Jerome Coutant
0:146cf26a9bbb
|
78
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
79
|
/** @brief LTDC Background layer index
|
|
Jerome Coutant
0:146cf26a9bbb
|
80
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
81
|
#define LTDC_ACTIVE_LAYER_BACKGROUND ((uint32_t) 0)
|
|
Jerome Coutant
0:146cf26a9bbb
|
82
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
83
|
/** @brief LTDC Foreground layer index
|
|
Jerome Coutant
0:146cf26a9bbb
|
84
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
85
|
#define LTDC_ACTIVE_LAYER_FOREGROUND ((uint32_t) 1)
|
|
Jerome Coutant
0:146cf26a9bbb
|
86
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
87
|
/** @brief Number of LTDC layers
|
|
Jerome Coutant
0:146cf26a9bbb
|
88
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
89
|
#define LTDC_NB_OF_LAYERS ((uint32_t) 2)
|
|
Jerome Coutant
0:146cf26a9bbb
|
90
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
91
|
/** @brief LTDC Default used layer index
|
|
Jerome Coutant
0:146cf26a9bbb
|
92
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
93
|
#define LTDC_DEFAULT_ACTIVE_LAYER LTDC_ACTIVE_LAYER_FOREGROUND
|
|
Jerome Coutant
0:146cf26a9bbb
|
94
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
95
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
96
|
* @brief LCD status structure definition
|
|
Jerome Coutant
0:146cf26a9bbb
|
97
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
98
|
#define LCD_OK 0x00
|
|
Jerome Coutant
0:146cf26a9bbb
|
99
|
#define LCD_ERROR 0x01
|
|
Jerome Coutant
0:146cf26a9bbb
|
100
|
#define LCD_TIMEOUT 0x02
|
|
Jerome Coutant
0:146cf26a9bbb
|
101
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
102
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
103
|
* @brief LCD Display OTM8009A ID
|
|
Jerome Coutant
0:146cf26a9bbb
|
104
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
105
|
#define LCD_OTM8009A_ID ((uint32_t) 0)
|
|
Jerome Coutant
0:146cf26a9bbb
|
106
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
107
|
#if defined(USE_LCD_HDMI)
|
|
Jerome Coutant
0:146cf26a9bbb
|
108
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
109
|
* @brief HDMI ADV7533 DSI Virtual Channel ID
|
|
Jerome Coutant
0:146cf26a9bbb
|
110
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
111
|
#define HDMI_ADV7533_ID ((uint32_t) 0)
|
|
Jerome Coutant
0:146cf26a9bbb
|
112
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
113
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
114
|
* @brief HDMI Foramt
|
|
Jerome Coutant
0:146cf26a9bbb
|
115
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
116
|
#define HDMI_FORMAT_720_480 ((uint8_t) 0x00) /*720_480 format choice of HDMI display */
|
|
Jerome Coutant
0:146cf26a9bbb
|
117
|
#define HDMI_FORMAT_720_576 ((uint8_t) 0x01) /*720_576 format choice of HDMI display*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
118
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
119
|
#endif /* USE_LCD_HDMI */
|
|
Jerome Coutant
0:146cf26a9bbb
|
120
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
121
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
122
|
* @brief LCD color definitions values
|
|
Jerome Coutant
0:146cf26a9bbb
|
123
|
* in ARGB8888 format.
|
|
Jerome Coutant
0:146cf26a9bbb
|
124
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
125
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
126
|
/** @brief Blue value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
127
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
128
|
#define LCD_COLOR_BLUE ((uint32_t) 0xFF0000FF)
|
|
Jerome Coutant
0:146cf26a9bbb
|
129
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
130
|
/** @brief Green value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
131
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
132
|
#define LCD_COLOR_GREEN ((uint32_t) 0xFF00FF00)
|
|
Jerome Coutant
0:146cf26a9bbb
|
133
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
134
|
/** @brief Red value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
135
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
136
|
#define LCD_COLOR_RED ((uint32_t) 0xFFFF0000)
|
|
Jerome Coutant
0:146cf26a9bbb
|
137
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
138
|
/** @brief Cyan value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
139
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
140
|
#define LCD_COLOR_CYAN ((uint32_t) 0xFF00FFFF)
|
|
Jerome Coutant
0:146cf26a9bbb
|
141
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
142
|
/** @brief Magenta value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
143
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
144
|
#define LCD_COLOR_MAGENTA ((uint32_t) 0xFFFF00FF)
|
|
Jerome Coutant
0:146cf26a9bbb
|
145
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
146
|
/** @brief Yellow value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
147
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
148
|
#define LCD_COLOR_YELLOW ((uint32_t) 0xFFFFFF00)
|
|
Jerome Coutant
0:146cf26a9bbb
|
149
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
150
|
/** @brief Light Blue value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
151
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
152
|
#define LCD_COLOR_LIGHTBLUE ((uint32_t) 0xFF8080FF)
|
|
Jerome Coutant
0:146cf26a9bbb
|
153
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
154
|
/** @brief Light Green value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
155
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
156
|
#define LCD_COLOR_LIGHTGREEN ((uint32_t) 0xFF80FF80)
|
|
Jerome Coutant
0:146cf26a9bbb
|
157
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
158
|
/** @brief Light Red value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
159
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
160
|
#define LCD_COLOR_LIGHTRED ((uint32_t) 0xFFFF8080)
|
|
Jerome Coutant
0:146cf26a9bbb
|
161
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
162
|
/** @brief Light Cyan value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
163
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
164
|
#define LCD_COLOR_LIGHTCYAN ((uint32_t) 0xFF80FFFF)
|
|
Jerome Coutant
0:146cf26a9bbb
|
165
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
166
|
/** @brief Light Magenta value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
167
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
168
|
#define LCD_COLOR_LIGHTMAGENTA ((uint32_t) 0xFFFF80FF)
|
|
Jerome Coutant
0:146cf26a9bbb
|
169
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
170
|
/** @brief Light Yellow value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
171
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
172
|
#define LCD_COLOR_LIGHTYELLOW ((uint32_t) 0xFFFFFF80)
|
|
Jerome Coutant
0:146cf26a9bbb
|
173
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
174
|
/** @brief Dark Blue value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
175
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
176
|
#define LCD_COLOR_DARKBLUE ((uint32_t) 0xFF000080)
|
|
Jerome Coutant
0:146cf26a9bbb
|
177
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
178
|
/** @brief Light Dark Green value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
179
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
180
|
#define LCD_COLOR_DARKGREEN ((uint32_t) 0xFF008000)
|
|
Jerome Coutant
0:146cf26a9bbb
|
181
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
182
|
/** @brief Light Dark Red value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
183
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
184
|
#define LCD_COLOR_DARKRED ((uint32_t) 0xFF800000)
|
|
Jerome Coutant
0:146cf26a9bbb
|
185
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
186
|
/** @brief Dark Cyan value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
187
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
188
|
#define LCD_COLOR_DARKCYAN ((uint32_t) 0xFF008080)
|
|
Jerome Coutant
0:146cf26a9bbb
|
189
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
190
|
/** @brief Dark Magenta value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
191
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
192
|
#define LCD_COLOR_DARKMAGENTA ((uint32_t) 0xFF800080)
|
|
Jerome Coutant
0:146cf26a9bbb
|
193
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
194
|
/** @brief Dark Yellow value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
195
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
196
|
#define LCD_COLOR_DARKYELLOW ((uint32_t) 0xFF808000)
|
|
Jerome Coutant
0:146cf26a9bbb
|
197
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
198
|
/** @brief White value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
199
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
200
|
#define LCD_COLOR_WHITE ((uint32_t) 0xFFFFFFFF)
|
|
Jerome Coutant
0:146cf26a9bbb
|
201
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
202
|
/** @brief Light Gray value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
203
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
204
|
#define LCD_COLOR_LIGHTGRAY ((uint32_t) 0xFFD3D3D3)
|
|
Jerome Coutant
0:146cf26a9bbb
|
205
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
206
|
/** @brief Gray value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
207
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
208
|
#define LCD_COLOR_GRAY ((uint32_t) 0xFF808080)
|
|
Jerome Coutant
0:146cf26a9bbb
|
209
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
210
|
/** @brief Dark Gray value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
211
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
212
|
#define LCD_COLOR_DARKGRAY ((uint32_t) 0xFF404040)
|
|
Jerome Coutant
0:146cf26a9bbb
|
213
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
214
|
/** @brief Black value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
215
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
216
|
#define LCD_COLOR_BLACK ((uint32_t) 0xFF000000)
|
|
Jerome Coutant
0:146cf26a9bbb
|
217
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
218
|
/** @brief Brown value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
219
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
220
|
#define LCD_COLOR_BROWN ((uint32_t) 0xFFA52A2A)
|
|
Jerome Coutant
0:146cf26a9bbb
|
221
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
222
|
/** @brief Orange value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
223
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
224
|
#define LCD_COLOR_ORANGE ((uint32_t) 0xFFFFA500)
|
|
Jerome Coutant
0:146cf26a9bbb
|
225
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
226
|
/** @brief Transparent value in ARGB8888 format
|
|
Jerome Coutant
0:146cf26a9bbb
|
227
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
228
|
#define LCD_COLOR_TRANSPARENT ((uint32_t) 0xFF000000)
|
|
Jerome Coutant
0:146cf26a9bbb
|
229
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
230
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
231
|
* @brief LCD default font
|
|
Jerome Coutant
0:146cf26a9bbb
|
232
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
233
|
#define LCD_DEFAULT_FONT Font24
|
|
Jerome Coutant
0:146cf26a9bbb
|
234
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
235
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
236
|
* @brief Possible values of
|
|
Jerome Coutant
0:146cf26a9bbb
|
237
|
* pixel data format (ie color coding) transmitted on DSI Data lane in DSI packets
|
|
Jerome Coutant
0:146cf26a9bbb
|
238
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
239
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
240
|
#define LCD_DSI_PIXEL_DATA_FMT_RBG888 DSI_RGB888 /*!< DSI packet pixel format chosen is RGB888 : 24 bpp */
|
|
Jerome Coutant
0:146cf26a9bbb
|
241
|
#define LCD_DSI_PIXEL_DATA_FMT_RBG565 DSI_RGB565 /*!< DSI packet pixel format chosen is RGB565 : 16 bpp */
|
|
Jerome Coutant
0:146cf26a9bbb
|
242
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
243
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
244
|
* @}
|
|
Jerome Coutant
0:146cf26a9bbb
|
245
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
246
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
247
|
/** @defgroup STM32H747I_DISCOVERY_LCD_Exported_Types Exported Types
|
|
Jerome Coutant
0:146cf26a9bbb
|
248
|
* @{
|
|
Jerome Coutant
0:146cf26a9bbb
|
249
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
250
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
251
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
252
|
* @brief LCD Drawing main properties
|
|
Jerome Coutant
0:146cf26a9bbb
|
253
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
254
|
typedef struct
|
|
Jerome Coutant
0:146cf26a9bbb
|
255
|
{
|
|
Jerome Coutant
0:146cf26a9bbb
|
256
|
uint32_t TextColor; /*!< Specifies the color of text */
|
|
Jerome Coutant
0:146cf26a9bbb
|
257
|
uint32_t BackColor; /*!< Specifies the background color below the text */
|
|
Jerome Coutant
0:146cf26a9bbb
|
258
|
sFONT *pFont; /*!< Specifies the font used for the text */
|
|
Jerome Coutant
0:146cf26a9bbb
|
259
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
260
|
} LCD_DrawPropTypeDef;
|
|
Jerome Coutant
0:146cf26a9bbb
|
261
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
262
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
263
|
* @brief LCD Drawing point (pixel) geometric definition
|
|
Jerome Coutant
0:146cf26a9bbb
|
264
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
265
|
typedef struct
|
|
Jerome Coutant
0:146cf26a9bbb
|
266
|
{
|
|
Jerome Coutant
0:146cf26a9bbb
|
267
|
int16_t X; /*!< geometric X position of drawing */
|
|
Jerome Coutant
0:146cf26a9bbb
|
268
|
int16_t Y; /*!< geometric Y position of drawing */
|
|
Jerome Coutant
0:146cf26a9bbb
|
269
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
270
|
} Point;
|
|
Jerome Coutant
0:146cf26a9bbb
|
271
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
272
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
273
|
* @brief Pointer on LCD Drawing point (pixel) geometric definition
|
|
Jerome Coutant
0:146cf26a9bbb
|
274
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
275
|
typedef Point * pPoint;
|
|
Jerome Coutant
0:146cf26a9bbb
|
276
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
277
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
278
|
* @brief LCD drawing Line alignment mode definitions
|
|
Jerome Coutant
0:146cf26a9bbb
|
279
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
280
|
typedef enum
|
|
Jerome Coutant
0:146cf26a9bbb
|
281
|
{
|
|
Jerome Coutant
0:146cf26a9bbb
|
282
|
CENTER_MODE = 0x01, /*!< Center mode */
|
|
Jerome Coutant
0:146cf26a9bbb
|
283
|
RIGHT_MODE = 0x02, /*!< Right mode */
|
|
Jerome Coutant
0:146cf26a9bbb
|
284
|
LEFT_MODE = 0x03 /*!< Left mode */
|
|
Jerome Coutant
0:146cf26a9bbb
|
285
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
286
|
} Text_AlignModeTypdef;
|
|
Jerome Coutant
0:146cf26a9bbb
|
287
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
288
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
289
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
290
|
* @brief LCD_OrientationTypeDef
|
|
Jerome Coutant
0:146cf26a9bbb
|
291
|
* Possible values of Display Orientation
|
|
Jerome Coutant
0:146cf26a9bbb
|
292
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
293
|
typedef enum
|
|
Jerome Coutant
0:146cf26a9bbb
|
294
|
{
|
|
Jerome Coutant
0:146cf26a9bbb
|
295
|
LCD_ORIENTATION_PORTRAIT = 0x00, /*!< Portrait orientation choice of LCD screen */
|
|
Jerome Coutant
0:146cf26a9bbb
|
296
|
LCD_ORIENTATION_LANDSCAPE = 0x01, /*!< Landscape orientation choice of LCD screen */
|
|
Jerome Coutant
0:146cf26a9bbb
|
297
|
LCD_ORIENTATION_INVALID = 0x02 /*!< Invalid orientation choice of LCD screen */
|
|
Jerome Coutant
0:146cf26a9bbb
|
298
|
} LCD_OrientationTypeDef;
|
|
Jerome Coutant
0:146cf26a9bbb
|
299
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
300
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
301
|
* @}
|
|
Jerome Coutant
0:146cf26a9bbb
|
302
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
303
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
304
|
/** @addtogroup STM32H747I_DISCOVERY_LCD_Exported_Functions
|
|
Jerome Coutant
0:146cf26a9bbb
|
305
|
* @{
|
|
Jerome Coutant
0:146cf26a9bbb
|
306
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
307
|
uint8_t BSP_LCD_Init(void);
|
|
Jerome Coutant
0:146cf26a9bbb
|
308
|
uint8_t BSP_LCD_InitEx(LCD_OrientationTypeDef orientation);
|
|
Jerome Coutant
0:146cf26a9bbb
|
309
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
310
|
#if defined(USE_LCD_HDMI)
|
|
Jerome Coutant
0:146cf26a9bbb
|
311
|
uint8_t BSP_LCD_HDMIInitEx(uint8_t format);
|
|
Jerome Coutant
0:146cf26a9bbb
|
312
|
#endif /* USE_LCD_HDMI */
|
|
Jerome Coutant
0:146cf26a9bbb
|
313
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
314
|
void BSP_LCD_MspDeInit(void);
|
|
Jerome Coutant
0:146cf26a9bbb
|
315
|
void BSP_LCD_MspInit(void);
|
|
Jerome Coutant
0:146cf26a9bbb
|
316
|
void BSP_LCD_Reset(void);
|
|
Jerome Coutant
0:146cf26a9bbb
|
317
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
318
|
uint32_t BSP_LCD_GetXSize(void);
|
|
Jerome Coutant
0:146cf26a9bbb
|
319
|
uint32_t BSP_LCD_GetYSize(void);
|
|
Jerome Coutant
0:146cf26a9bbb
|
320
|
void BSP_LCD_SetXSize(uint32_t imageWidthPixels);
|
|
Jerome Coutant
0:146cf26a9bbb
|
321
|
void BSP_LCD_SetYSize(uint32_t imageHeightPixels);
|
|
Jerome Coutant
0:146cf26a9bbb
|
322
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
323
|
void BSP_LCD_LayerDefaultInit(uint16_t LayerIndex, uint32_t FB_Address);
|
|
Jerome Coutant
0:146cf26a9bbb
|
324
|
void BSP_LCD_SetTransparency(uint32_t LayerIndex, uint8_t Transparency);
|
|
Jerome Coutant
0:146cf26a9bbb
|
325
|
void BSP_LCD_SetLayerAddress(uint32_t LayerIndex, uint32_t Address);
|
|
Jerome Coutant
0:146cf26a9bbb
|
326
|
void BSP_LCD_SetColorKeying(uint32_t LayerIndex, uint32_t RGBValue);
|
|
Jerome Coutant
0:146cf26a9bbb
|
327
|
void BSP_LCD_ResetColorKeying(uint32_t LayerIndex);
|
|
Jerome Coutant
0:146cf26a9bbb
|
328
|
void BSP_LCD_SetLayerWindow(uint16_t LayerIndex, uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
|
|
Jerome Coutant
0:146cf26a9bbb
|
329
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
330
|
void BSP_LCD_SelectLayer(uint32_t LayerIndex);
|
|
Jerome Coutant
0:146cf26a9bbb
|
331
|
void BSP_LCD_SetLayerVisible(uint32_t LayerIndex, FunctionalState State);
|
|
Jerome Coutant
0:146cf26a9bbb
|
332
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
333
|
void BSP_LCD_SetTextColor(uint32_t Color);
|
|
Jerome Coutant
0:146cf26a9bbb
|
334
|
uint32_t BSP_LCD_GetTextColor(void);
|
|
Jerome Coutant
0:146cf26a9bbb
|
335
|
void BSP_LCD_SetBackColor(uint32_t Color);
|
|
Jerome Coutant
0:146cf26a9bbb
|
336
|
uint32_t BSP_LCD_GetBackColor(void);
|
|
Jerome Coutant
0:146cf26a9bbb
|
337
|
void BSP_LCD_SetFont(sFONT *fonts);
|
|
Jerome Coutant
0:146cf26a9bbb
|
338
|
sFONT *BSP_LCD_GetFont(void);
|
|
Jerome Coutant
0:146cf26a9bbb
|
339
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
340
|
uint32_t BSP_LCD_ReadPixel(uint16_t Xpos, uint16_t Ypos);
|
|
Jerome Coutant
0:146cf26a9bbb
|
341
|
void BSP_LCD_DrawPixel(uint16_t Xpos, uint16_t Ypos, uint32_t pixel);
|
|
Jerome Coutant
0:146cf26a9bbb
|
342
|
void BSP_LCD_Clear(uint32_t Color);
|
|
Jerome Coutant
0:146cf26a9bbb
|
343
|
void BSP_LCD_ClearStringLine(uint32_t Line);
|
|
Jerome Coutant
0:146cf26a9bbb
|
344
|
void BSP_LCD_DisplayStringAtLine(uint16_t Line, uint8_t *ptr);
|
|
Jerome Coutant
0:146cf26a9bbb
|
345
|
void BSP_LCD_DisplayStringAt(uint16_t Xpos, uint16_t Ypos, uint8_t *Text, Text_AlignModeTypdef Mode);
|
|
Jerome Coutant
0:146cf26a9bbb
|
346
|
void BSP_LCD_DisplayChar(uint16_t Xpos, uint16_t Ypos, uint8_t Ascii);
|
|
Jerome Coutant
0:146cf26a9bbb
|
347
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
348
|
void BSP_LCD_DrawHLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length);
|
|
Jerome Coutant
0:146cf26a9bbb
|
349
|
void BSP_LCD_DrawVLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length);
|
|
Jerome Coutant
0:146cf26a9bbb
|
350
|
void BSP_LCD_DrawLine(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2);
|
|
Jerome Coutant
0:146cf26a9bbb
|
351
|
void BSP_LCD_DrawRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
|
|
Jerome Coutant
0:146cf26a9bbb
|
352
|
void BSP_LCD_DrawCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius);
|
|
Jerome Coutant
0:146cf26a9bbb
|
353
|
void BSP_LCD_DrawPolygon(pPoint Points, uint16_t PointCount);
|
|
Jerome Coutant
0:146cf26a9bbb
|
354
|
void BSP_LCD_DrawEllipse(int Xpos, int Ypos, int XRadius, int YRadius);
|
|
Jerome Coutant
0:146cf26a9bbb
|
355
|
void BSP_LCD_DrawBitmap(uint32_t Xpos, uint32_t Ypos, uint8_t *pbmp);
|
|
Jerome Coutant
0:146cf26a9bbb
|
356
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
357
|
void BSP_LCD_FillRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
|
|
Jerome Coutant
0:146cf26a9bbb
|
358
|
void BSP_LCD_FillCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius);
|
|
Jerome Coutant
0:146cf26a9bbb
|
359
|
void BSP_LCD_FillPolygon(pPoint Points, uint16_t PointCount);
|
|
Jerome Coutant
0:146cf26a9bbb
|
360
|
void BSP_LCD_FillEllipse(int Xpos, int Ypos, int XRadius, int YRadius);
|
|
Jerome Coutant
0:146cf26a9bbb
|
361
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
362
|
void BSP_LCD_DisplayOff(void);
|
|
Jerome Coutant
0:146cf26a9bbb
|
363
|
void BSP_LCD_DisplayOn(void);
|
|
Jerome Coutant
0:146cf26a9bbb
|
364
|
void BSP_LCD_SetBrightness(uint8_t BrightnessValue);
|
|
Jerome Coutant
0:146cf26a9bbb
|
365
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
366
|
* @}
|
|
Jerome Coutant
0:146cf26a9bbb
|
367
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
368
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
369
|
/** @addtogroup STM32H747I_DISCOVERY_LCD_Exported_Variables
|
|
Jerome Coutant
0:146cf26a9bbb
|
370
|
* @{
|
|
Jerome Coutant
0:146cf26a9bbb
|
371
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
372
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
373
|
/* @brief DMA2D handle variable */
|
|
Jerome Coutant
0:146cf26a9bbb
|
374
|
extern DMA2D_HandleTypeDef hdma2d_discovery;
|
|
Jerome Coutant
0:146cf26a9bbb
|
375
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
376
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
377
|
* @}
|
|
Jerome Coutant
0:146cf26a9bbb
|
378
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
379
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
380
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
381
|
* @}
|
|
Jerome Coutant
0:146cf26a9bbb
|
382
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
383
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
384
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
385
|
* @}
|
|
Jerome Coutant
0:146cf26a9bbb
|
386
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
387
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
388
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
389
|
* @}
|
|
Jerome Coutant
0:146cf26a9bbb
|
390
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
391
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
392
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
393
|
* @}
|
|
Jerome Coutant
0:146cf26a9bbb
|
394
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
395
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
396
|
#ifdef __cplusplus
|
|
Jerome Coutant
0:146cf26a9bbb
|
397
|
}
|
|
Jerome Coutant
0:146cf26a9bbb
|
398
|
#endif
|
|
Jerome Coutant
0:146cf26a9bbb
|
399
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
400
|
#endif /* __STM32H747I_DISCOVERY_LCD_H */
|
|
Jerome Coutant
0:146cf26a9bbb
|
401
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
402
|
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
|