forked from esp-arduino-libs/ESP32_Display_Panel
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathesp_panel_drivers_conf.h
More file actions
267 lines (247 loc) · 13.2 KB
/
esp_panel_drivers_conf.h
File metadata and controls
267 lines (247 loc) · 13.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
/*
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file esp_panel_drivers_conf.h
* @brief Configuration file for ESP Panel Drivers
*
* This file contains all the configurations needed for ESP Panel Drivers.
* Users can modify these configurations according to their requirements.
*/
#pragma once
// *INDENT-OFF*
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////// Bus Configurations //////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* @brief Bus driver availability
*
* Enable or disable bus drivers used in the factory class. Disable to reduce code size.
* Set to `1` to enable, `0` to disable.
*/
#define ESP_PANEL_DRIVERS_BUS_USE_ALL (1)
#if !ESP_PANEL_DRIVERS_BUS_USE_ALL
#define ESP_PANEL_DRIVERS_BUS_USE_SPI (0)
#define ESP_PANEL_DRIVERS_BUS_USE_QSPI (0)
#define ESP_PANEL_DRIVERS_BUS_USE_RGB (0)
#define ESP_PANEL_DRIVERS_BUS_USE_I2C (0)
#define ESP_PANEL_DRIVERS_BUS_USE_MIPI_DSI (0)
#endif // ESP_PANEL_DRIVERS_BUS_USE_ALL
/**
* @brief Controls compilation of unused bus drivers
*
* Enable or disable compilation of unused bus drivers.
* When set to `0`, code for unused bus drivers will be excluded to speed up compilation. At this time,
* users should ensure that the bus driver is not used.
*
* Example with SPI:
* (CONF1 = ESP_PANEL_DRIVERS_BUS_USE_SPI, CONF2 = ESP_PANEL_DRIVERS_BUS_COMPILE_UNUSED_DRIVERS)
*
* | CONF1 | CONF2 | Driver Available ( = CONF1 ^ CONF2) | Factory Support ( = CONF1) |
* |-------|-------|-------------------------------------|----------------------------|
* | 0 | 0 | No | No |
* | 1 | 0 | Yes | Yes |
* | 0 | 1 | Yes | No |
* | 1 | 1 | Yes | Yes |
*/
#define ESP_PANEL_DRIVERS_BUS_COMPILE_UNUSED_DRIVERS (1)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////// LCD Configurations ///////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* @brief LCD driver availability
*
* Enable or disable LCD drivers used in the factory class. Disable to reduce code size.
* Set to `1` to enable, `0` to disable.
*/
#define ESP_PANEL_DRIVERS_LCD_USE_ALL (0)
#if !ESP_PANEL_DRIVERS_LCD_USE_ALL
#define ESP_PANEL_DRIVERS_LCD_USE_AXS15231B (0)
#define ESP_PANEL_DRIVERS_LCD_USE_EK9716B (0)
#define ESP_PANEL_DRIVERS_LCD_USE_EK79007 (0)
#define ESP_PANEL_DRIVERS_LCD_USE_GC9A01 (0)
#define ESP_PANEL_DRIVERS_LCD_USE_GC9B71 (0)
#define ESP_PANEL_DRIVERS_LCD_USE_GC9503 (0)
#define ESP_PANEL_DRIVERS_LCD_USE_HX8399 (0)
#define ESP_PANEL_DRIVERS_LCD_USE_ILI9341 (0)
#define ESP_PANEL_DRIVERS_LCD_USE_ILI9881C (0)
#define ESP_PANEL_DRIVERS_LCD_USE_JD9165 (0)
#define ESP_PANEL_DRIVERS_LCD_USE_JD9365 (0)
#define ESP_PANEL_DRIVERS_LCD_USE_NV3022B (0)
#define ESP_PANEL_DRIVERS_LCD_USE_SH8601 (0)
#define ESP_PANEL_DRIVERS_LCD_USE_SPD2010 (0)
#define ESP_PANEL_DRIVERS_LCD_USE_ST7262 (0)
#define ESP_PANEL_DRIVERS_LCD_USE_ST7701 (0)
#define ESP_PANEL_DRIVERS_LCD_USE_ST7703 (0)
#define ESP_PANEL_DRIVERS_LCD_USE_ST7789 (0)
#define ESP_PANEL_DRIVERS_LCD_USE_ST7796 (0)
#define ESP_PANEL_DRIVERS_LCD_USE_ST77903 (0)
#define ESP_PANEL_DRIVERS_LCD_USE_ST77916 (0)
#define ESP_PANEL_DRIVERS_LCD_USE_ST77922 (0)
#endif // ESP_PANEL_DRIVERS_LCD_USE_ALL
/**
* @brief Controls compilation of unused LCD drivers
*
* Enable or disable compilation of unused LCD drivers.
* When set to `0`, code for unused LCD drivers will be excluded to speed up compilation. At this time,
* users should ensure that the LCD driver is not used.
*
* Example with ILI9341:
* (CONF1 = ESP_PANEL_DRIVERS_LCD_USE_ILI9341, CONF2 = ESP_PANEL_DRIVERS_LCD_COMPILE_UNUSED_DRIVERS)
*
* | CONF1 | CONF2 | Driver Available ( = CONF1 ^ CONF2) | Factory Support ( = CONF1) |
* |-------|-------|-------------------------------------|----------------------------|
* | 0 | 0 | No | No |
* | 1 | 0 | Yes | Yes |
* | 0 | 1 | Yes | No |
* | 1 | 1 | Yes | Yes |
*/
#define ESP_PANEL_DRIVERS_LCD_COMPILE_UNUSED_DRIVERS (1)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////// Touch Configurations /////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* @brief Touch panel configuration parameters
*/
#define ESP_PANEL_DRIVERS_TOUCH_MAX_POINTS (10) // Maximum number of touch points supported
#define ESP_PANEL_DRIVERS_TOUCH_MAX_BUTTONS (5) // Maximum number of touch buttons supported
/**
* @brief Touch driver availability
*
* Enable or disable touch drivers used in the factory class. Disable to reduce code size.
* Set to `1` to enable, `0` to disable.
*/
#define ESP_PANEL_DRIVERS_TOUCH_USE_ALL (0)
#if !ESP_PANEL_DRIVERS_TOUCH_USE_ALL
#define ESP_PANEL_DRIVERS_TOUCH_USE_AXS15231B (0)
#define ESP_PANEL_DRIVERS_TOUCH_USE_CHSC6540 (0)
#define ESP_PANEL_DRIVERS_TOUCH_USE_CST816S (0)
#define ESP_PANEL_DRIVERS_TOUCH_USE_CST820 (0)
#define ESP_PANEL_DRIVERS_TOUCH_USE_FT5x06 (0)
#define ESP_PANEL_DRIVERS_TOUCH_USE_GT911 (0)
#define ESP_PANEL_DRIVERS_TOUCH_USE_GT1151 (0)
#define ESP_PANEL_DRIVERS_TOUCH_USE_SPD2010 (0)
#define ESP_PANEL_DRIVERS_TOUCH_USE_ST1633 (0)
#define ESP_PANEL_DRIVERS_TOUCH_USE_ST7123 (0)
#define ESP_PANEL_DRIVERS_TOUCH_USE_STMPE610 (0)
#define ESP_PANEL_DRIVERS_TOUCH_USE_TT21100 (0)
#define ESP_PANEL_DRIVERS_TOUCH_USE_XPT2046 (0)
#endif // ESP_PANEL_DRIVERS_TOUCH_USE_ALL
/**
* @brief Controls compilation of unused touch drivers
*
* Enable or disable compilation of unused touch drivers.
* When set to `0`, code for unused touch drivers will be excluded to speed up compilation. At this time,
* users should ensure that the touch driver is not used.
*
* Example with GT911:
* (CONF1 = ESP_PANEL_DRIVERS_TOUCH_USE_GT911, CONF2 = ESP_PANEL_DRIVERS_TOUCH_COMPILE_UNUSED_DRIVERS)
*
* | CONF1 | CONF2 | Driver Available ( = CONF1 ^ CONF2) | Factory Support ( = CONF1) |
* |-------|-------|-------------------------------------|----------------------------|
* | 0 | 0 | No | No |
* | 1 | 0 | Yes | Yes |
* | 0 | 1 | Yes | No |
* | 1 | 1 | Yes | Yes |
*/
#define ESP_PANEL_DRIVERS_TOUCH_COMPILE_UNUSED_DRIVERS (1)
#if ESP_PANEL_DRIVERS_TOUCH_USE_XPT2046 || ESP_PANEL_DRIVERS_TOUCH_COMPILE_UNUSED_DRIVERS
/**
* @brief XPT2046 touch panel specific configurations
*/
#define ESP_PANEL_DRIVERS_TOUCH_XPT2046_Z_THRESHOLD (400) // Minimum pressure threshold for touch detection
/**
* @brief Enable interrupt (PENIRQ) output mode
*
* When enabled, XPT2046 outputs low on PENIRQ when touch is detected (Full Power Mode).
* Consumes more power but provides interrupt capability.
*/
#define ESP_PANEL_DRIVERS_TOUCH_XPT2046_INTERRUPT_MODE (0)
/**
* @brief Keep internal voltage reference enabled
*
* When enabled, internal Vref remains on between conversions. Slightly higher power consumption,
* but requires fewer transactions for battery voltage, aux voltage and temperature readings.
*/
#define ESP_PANEL_DRIVERS_TOUCH_XPT2046_VREF_ON_MODE (0)
/**
* @brief Enable automatic coordinate conversion
*
* When enabled, raw ADC values (0-4096) are converted to screen coordinates.
* When disabled, `process_coordinates` must be called manually to convert values.
*/
#define ESP_PANEL_DRIVERS_TOUCH_XPT2046_CONVERT_ADC_TO_COORDS (1)
/**
* @brief Enable data structure locking
*
* When enabled, driver locks touch position data structures during reads.
* Warning: May cause unexpected crashes.
*/
#define ESP_PANEL_DRIVERS_TOUCH_XPT2046_ENABLE_LOCKING (0)
#endif // ESP_PANEL_DRIVERS_TOUCH_USE_XPT2046 || ESP_PANEL_DRIVERS_TOUCH_COMPILE_UNUSED_DRIVERS
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////// IO Expander Configurations //////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* @brief IO Expander driver availability
*
* Enable or disable IO Expander drivers used in the factory class. Disable to reduce code size.
* Set to `1` to enable, `0` to disable.
*/
#define ESP_PANEL_DRIVERS_EXPANDER_USE_ALL (0)
#if !ESP_PANEL_DRIVERS_EXPANDER_USE_ALL
#define ESP_PANEL_DRIVERS_EXPANDER_USE_CH422G (0)
#define ESP_PANEL_DRIVERS_EXPANDER_USE_HT8574 (0)
#define ESP_PANEL_DRIVERS_EXPANDER_USE_TCA95XX_8BIT (0)
#define ESP_PANEL_DRIVERS_EXPANDER_USE_TCA95XX_16BIT (0)
#endif // ESP_PANEL_DRIVERS_EXPANDER_USE_ALL
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////// Backlight Configurations ///////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* @brief Backlight driver availability
*
* Enable or disable backlight drivers used in the factory class. Disable to reduce code size.
* Set to `1` to enable, `0` to disable.
*/
#define ESP_PANEL_DRIVERS_BACKLIGHT_USE_ALL (1)
#if !ESP_PANEL_DRIVERS_BACKLIGHT_USE_ALL
#define ESP_PANEL_DRIVERS_BACKLIGHT_USE_SWITCH_GPIO (0)
#define ESP_PANEL_DRIVERS_BACKLIGHT_USE_SWITCH_EXPANDER (0)
#define ESP_PANEL_DRIVERS_BACKLIGHT_USE_PWM_LEDC (0)
#define ESP_PANEL_DRIVERS_BACKLIGHT_USE_CUSTOM (0)
#endif // ESP_PANEL_DRIVERS_BACKLIGHT_USE_ALL
/**
* @brief Controls compilation of unused backlight drivers
*
* Enable or disable compilation of unused backlight drivers.
* When set to `0`, code for unused backlight drivers will be excluded to speed up compilation. At this time,
* users should ensure that the backlight driver is not used.
*
* Example with PWM_LEDC:
* (CONF1 = ESP_PANEL_DRIVERS_BACKLIGHT_USE_PWM_LEDC, CONF2 = ESP_PANEL_DRIVERS_BACKLIGHT_COMPILE_UNUSED_DRIVERS)
*
* | CONF1 | CONF2 | Driver Available ( = CONF1 ^ CONF2) | Factory Support ( = CONF1) |
* |-------|-------|-------------------------------------|----------------------------|
* | 0 | 0 | No | No |
* | 1 | 0 | Yes | Yes |
* | 0 | 1 | Yes | No |
* | 1 | 1 | Yes | Yes |
*/
#define ESP_PANEL_DRIVERS_BACKLIGHT_COMPILE_UNUSED_DRIVERS (1)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////// File Version ///////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Do not change the following versions. These version numbers are used to check compatibility between this
* configuration file and the library. Rules for version numbers:
* 1. Major version mismatch: Configurations are incompatible, must use library version
* 2. Minor version mismatch: May be missing new configurations, recommended to update
* 3. Patch version mismatch: No impact on functionality
*/
#define ESP_PANEL_DRIVERS_CONF_FILE_VERSION_MAJOR 1
#define ESP_PANEL_DRIVERS_CONF_FILE_VERSION_MINOR 1
#define ESP_PANEL_DRIVERS_CONF_FILE_VERSION_PATCH 0
// *INDENT-ON*