forked from Bodmer/TFT_eSPI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Kconfig
375 lines (323 loc) · 11.6 KB
/
Kconfig
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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
menu "TFT_eSPI"
menu "Hidden menu"
visible if false
config TFT_eSPI_ESPIDF
bool "Enable Configuration"
default y
endmenu
choice TFT_DRIVER
prompt "Select TFT driver"
default TFT_ILI9341_DRIVER
help
Driver for the TFT LCD screen
config TFT_ILI9341_DRIVER
bool "ILI9341 - 1"
help
Generic driver for common displays
config TFT_ILI9341_2_DRIVER
bool "ILI9341 - 2"
help
Alternative ILI9341 driver, see https://github.com/Bodmer/TFT_eSPI/issues/1172
config TFT_ST7735_DRIVER
bool "ST7735"
help
Define additional parameters below for this display
config TFT_ILI9163_DRIVER
bool "ILI9163"
help
Define additional parameters below for this display
config TFT_S6D02A1_DRIVER
bool "S6D02A1"
config TFT_HX8357D_DRIVER
bool "HX8357D"
config TFT_ILI9481_DRIVER
bool "ILI9481"
config TFT_ILI9486_DRIVER
bool "ILI9486"
config TFT_ILI9488_DRIVER
bool "ILI9488"
help
WARNING: Do not connect ILI9488 display SDO to MISO if other devices
share the SPI bus (TFT SDO does NOT tristate when CS is high)
config TFT_ST7789_DRIVER
bool "ST7789 - 1"
help
Full configuration option, define additional parameters below for this display
config TFT_ST7789_2_DRIVER
bool "ST7789 - 2"
help
Minimal configuration option, define additional parameters below for this display
config TFT_R61581_DRIVER
bool "R61581"
config TFT_RM68140_DRIVER
bool "RM68140"
config TFT_ST7796_DRIVER
bool "ST7796"
config TFT_SSD1351_DRIVER
bool "SSD1351"
config TFT_SSD1963_480_DRIVER
bool "SSD1963_480"
config TFT_SSD1963_800_DRIVER
bool "SSD1963_800"
config TFT_SSD1963_800ALT_DRIVER
bool "SSD1963_800ALT"
config TFT_ILI9225_DRIVER
bool "ILI9225"
config TFT_GC9A01_DRIVER
bool "GC9A01"
endchoice
if TFT_ST7735_DRIVER || TFT_ST7789_DRIVER || TFT_ST7789_2_DRIVER || TFT_ILI9341_DRIVER || TFT_ILI9341_2_DRIVER
choice TFT_COLOR_ORDER
prompt "Define the colour order"
help
Define the colour order IF the blue and red are swapped on your display
config TFT_RGB_ORDER
bool "RGB"
config TFT_BGR_ORDER
bool "BGR"
endchoice
endif
config TFT_M5STACK
bool "M5Stack"
depends on TFT_ILI9341_DRIVER || TFT_ILI9341_2_DRIVER
help
Enable if using M5Stack module with integrated ILI9341
if TFT_ST7735_DRIVER || TFT_ST7789_DRIVER || TFT_ST7789_2_DRIVER || TFT_ILI9163_DRIVER || TFT_GC9A01_DRIVER
config TFT_WIDTH
int "LCD pixel width in portrait orientation"
default 128
range 0 1024
config TFT_HEIGHT
int "LCD pixel height in portrait orientation"
default 240
range 0 1024
endif
if TFT_ST7735_DRIVER
choice TFT_ST7735_TYPE
prompt "Define the type of display"
help
Try out the different options below if the screen does not display graphics
correctly,e.g. colours wrong, mirror images, or stray pixels at the edges.
config TFT_ST7735_INITB
bool "INITB"
config TFT_ST7735_GREENTAB
bool "GREENTAB"
config TFT_ST7735_GREENTAB2
bool "GREENTAB2"
config TFT_ST7735_GREENTAB3
bool "GREENTAB3"
config TFT_ST7735_GREENTAB128
bool "GREENTAB128"
help
For 128 x 128 display
config TFT_ST7735_GREENTAB160x80
bool "GREENTAB160x80"
help
For 160 x 80 display (BGR, inverted, 26 offset)
config TFT_ST7735_REDTAB
bool "REDTAB"
config TFT_ST7735_BLACKTAB
bool "BLACKTAB"
config TFT_ST7735_REDTAB160x80
bool "REDTAB160x80"
help
For 160 x 80 display with 24 pixel offset
endchoice
endif
choice TFT_COLOR_INVERSION
prompt "Color inversion correction"
help
If colours are inverted (white shows as black) then try changing this option."
config TFT_INVERSION_DISABLE
bool "None"
config TFT_INVERSION_ON
bool "On"
config TFT_INVERSION_OFF
bool "Off"
endchoice
config TFT_PARALLEL_8_BIT
bool "Enable 8-bit parallel mode (otherwise SPI is assumed)"
default "n"
depends on IDF_TARGET_ESP32
help
Use 8-bit parallel bus to send data to the LCD. If not set SPI will be used.
menu "Display Data pins"
depends on TFT_PARALLEL_8_BIT
config TFT_D0
int "Data 0 pin"
default -1
range -1 31
config TFT_D1
int "Data 1 pin"
default -1
range -1 31
config TFT_D2
int "Data 2 pin"
default -1
range -1 31
config TFT_D3
int "Data 3 pin"
default -1
range -1 31
config TFT_D4
int "Data 4 pin"
default -1
range -1 31
config TFT_D5
int "Data 5 pin"
default -1
range -1 31
config TFT_D6
int "Data 6 pin"
default -1
range -1 31
config TFT_D7
int "Data 7 pin"
default -1
range -1 31
config TFT_WR
int "Write strobe pin"
default -1
range -1 31
config TFT_RD
int "Read strobe pin"
default -1
range -1 33
endmenu
menu "Display SPI config"
depends on !TFT_PARALLEL_8_BIT
config TFT_MISO
int "TFT MISO pin"
default -1
range -1 32 if IDF_TARGET_ESP32
range -1 45 if IDF_TARGET_ESP32S2
help
Master In Slave Out pin.
Can be labelled as SDO in some displays
config TFT_MOSI
int "TFT MOSI pin"
default -1
range -1 32 if IDF_TARGET_ESP32
range -1 45 if IDF_TARGET_ESP32S2
help
Master Out Slave In pin.
Can be labelled as SDA or SDI in some displays
config TFT_SCLK
int "TFT Clock pin"
default -1
range -1 32 if IDF_TARGET_ESP32
range -1 45 if IDF_TARGET_ESP32S2
help
Labelled in some displays as WR
config TFT_SDA_READ
bool "Use SDA line for reading"
default "n"
help
Some displays support SPI reads via the MISO pin, other displays have a single
bi-directional SDA pin and the library will try to read this via the MOSI line
config TFT_SPI_FREQUENCY
int "SPI Frequency (Hz)"
default 27000000
range 1 80000000
help
Define the SPI clock frequency, this affects the graphics rendering speed. Too
fast and the TFT driver will not keep up and display corruption appears.
With an ILI9341 display 40MHz works OK, 80MHz sometimes fails
With a ST7735 display more than 27MHz may not work (spurious pixels and lines)
With an ILI9163 display 27 MHz works OK.
config TFT_SPI_READ_FREQ
int "SPI Read Frequency (Hz)"
default 20000000
range -1 80000000
help
Optional reduced SPI frequency for reading TFT.
Set to -1 to use the default frequency
endmenu
menu "Control Pin configuration"
config TFT_CS
int "TFT Chip Select pin"
default -1
range -1 33 if IDF_TARGET_ESP32
range -1 45 if IDF_TARGET_ESP32S2
config TFT_DC
int "TFT Data/Command pin"
default -1
range -1 31
help
Labelled as DC or RS (Register Select) in some displays
config TFT_RST
int "TFT Reset pin"
default -1
range -1 33 if IDF_TARGET_ESP32
range -1 45 if IDF_TARGET_ESP32S2
config ENABLE_BL
bool "Enable backlight control"
default y
if ENABLE_BL
config TFT_BL
int "TFT Backlight pin"
default -1
range -1 33 if IDF_TARGET_ESP32
range -1 45 if IDF_TARGET_ESP32S2
help
Pin for the backlight control signal
choice TFT_BACKLIGHT_ON
bool "Pin state to activate backlight"
default TFT_BACKLIGHT_ON_HIGH
help
The backlight will be turned ON when tft.begin() is called, but the library
needs to know if the LEDs are ON with the pin HIGH or LOW.
config TFT_BACKLIGHT_ON_HIGH
bool "HIGH"
config TFT_BACKLIGHT_ON_LOW
bool "LOW"
endchoice
endif
config TFT_BACKLIGHT_ON
int
default 1 if TFT_BACKLIGHT_ON_HIGH
default 0 if TFT_BACKLIGHT_ON_LOW
endmenu
menu "Fonts"
config TFT_LOAD_GLCD
bool "Font 1: Original Adafruit 8 pixel font needs ~1820 bytes in FLASH"
default "y"
config TFT_LOAD_FONT2
bool "Font 2: Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters"
default "y"
config TFT_LOAD_FONT4
bool "Font 4: Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters"
default "y"
config TFT_LOAD_FONT6
bool "Font 6: Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm"
default "y"
config TFT_LOAD_FONT7
bool "Font 7: 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:."
default "y"
config TFT_LOAD_FONT8
bool "Font 8: Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-."
default "y"
config TFT_LOAD_GFXFF
bool "FreeFonts: Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts"
default "y"
config TFT_SMOOTH_FONT
bool "Smooth Fonts"
default "y"
endmenu
menu "Touch screen configuration"
config ENABLE_TOUCH
bool "Enable Touch"
default n
if ENABLE_TOUCH
config TOUCH_CS
int "Touch chip select pin"
default -1
range -1 33 if IDF_TARGET_ESP32
range -1 45 if IDF_TARGET_ESP32S2
config SPI_TOUCH_FREQUENCY
int "SPI frequency for XPT2046 chip (Hz)"
default 2500000
range 1 80000000
endif
endmenu
endmenu