FabGL
ESP32 Display Controller and Graphics Library
fabglconf.h
Go to the documentation of this file.
1/*
2 Created by Fabrizio Di Vittorio (fdivitto2013@gmail.com) - <http://www.fabgl.com>
3 Copyright (c) 2019-2022 Fabrizio Di Vittorio.
4 All rights reserved.
5
6
7* Please contact fdivitto2013@gmail.com if you need a commercial license.
8
9
10* This library and related software is available under GPL v3.
11
12 FabGL is free software: you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation, either version 3 of the License, or
15 (at your option) any later version.
16
17 FabGL is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
21
22 You should have received a copy of the GNU General Public License
23 along with FabGL. If not, see <http://www.gnu.org/licenses/>.
24 */
25
26
27#pragma once
28
29
30
40#include <esp_wifi.h>
41
42
43
45#define FABGLIB_XTAL 40000000
46
47
49#define FABGLIB_DEFAULT_BLINK_PERIOD_MS 500
50
51
53#define FABGLIB_DEFAULT_DISPLAYCONTROLLER_QUEUE_SIZE 1024
54
55
56#define FABGLIB_TERMINAL_FLOWCONTROL_RXFIFO_MIN_THRESHOLD 20
57
58#define FABGLIB_TERMINAL_FLOWCONTROL_RXFIFO_MAX_THRESHOLD 300
59
60
62#define FABGLIB_PRIMITIVES_DYNBUFFERS_SIZE 512
63
64
66#define FABGLIB_DEFAULT_TERMINAL_INPUT_QUEUE_SIZE 1024
67
68
70#define FABGLIB_TERMINAL_OUTPUT_QUEUE_SIZE 32
71
72
73#define FABGLIB_TERMINAL_XOFF_THRESHOLD (FABGLIB_DEFAULT_TERMINAL_INPUT_QUEUE_SIZE / 2)
74#define FABGLIB_TERMINAL_XON_THRESHOLD (FABGLIB_DEFAULT_TERMINAL_INPUT_QUEUE_SIZE / 4)
75
76
78#define FABGLIB_DEFAULT_TERMINAL_INPUT_CONSUMER_TASK_STACK_SIZE 2048
79
80
82#define FABGLIB_CHARS_CONSUMER_TASK_PRIORITY 5
83
84
86#define FABGLIB_DEFAULT_TERMINAL_KEYBOARD_READER_TASK_STACK_SIZE 2048
87
88
90#define FABGLIB_KEYBOARD_READER_TASK_PRIORITY 5
91
92
94#define FABGLIB_DEFAULT_SCODETOVK_TASK_STACK_SIZE 1500
95
96
98#define FABGLIB_SCODETOVK_TASK_PRIORITY 5
99
100
102#define FABGLIB_UNDERLINE_POSITION 0
103
104
106#define FABGLIB_CACHE_FONT_IN_RAM 0
107
108
110#define FABGLIB_HAS_VirtualKeyO_STRING 1
111
112
114#define FABGLIB_USE_APLL_AB_COEF 0
115
116
118#define FABGLIB_MAX_CSI_PARAMS 12
119
120
122#define FABGLIB_MAX_DCS_CONTENT 12
123
124
126#define FABGLIB_VIEWPORT_MEMORY_POOL_COUNT 128
127
128
130#define FABGLIB_MINFREELARGESTBLOCK 40000
131
132
134#define FABGLIB_KEYBOARD_VIRTUALKEY_QUEUE_SIZE 32
135
136
138#define FABGLIB_MOUSE_EVENTS_QUEUE_SIZE 64
139
140
142#define FABGLIB_VIDEO_CPUINTENSIVE_TASKS_CORE (WIFI_TASK_CORE_ID ^ 1) // using the same core of WiFi may cause flickering
143
144
146#define FABGLIB_VGAPALETTEDCONTROLLER_PRIMTASK_STACK_SIZE 1200
147
148
150#define FABGLIB_VGAPALETTEDCONTROLLER_PRIMTASK_PRIORITY 5
151
152
153
154// debug options
155#define FABGLIB_TERMINAL_DEBUG_REPORT 0 // this must be enabled to make below settings active
156#define FABGLIB_TERMINAL_DEBUG_REPORT_IN_CODES 0
157#define FABGLIB_TERMINAL_DEBUG_REPORT_INQUEUE_CODES 0 // use as alternative to FABGLIB_TERMINAL_DEBUG_REPORT_IN_CODES when write() is called inside isr
158#define FABGLIB_TERMINAL_DEBUG_REPORT_OUT_CODES 0
159#define FABGLIB_TERMINAL_DEBUG_REPORT_ESC 0
160#define FABGLIB_TERMINAL_DEBUG_REPORT_DESCS 0
161#define FABGLIB_TERMINAL_DEBUG_REPORT_DESCSALL 0
162#define FABGLIB_TERMINAL_DEBUG_REPORT_OSC_CONTENT 0
163#define FABGLIB_TERMINAL_DEBUG_REPORT_UNSUPPORT 1
164#define FABGLIB_TERMINAL_DEBUG_REPORT_ERRORS 1
165#define FABGLIB_VGAXCONTROLLER_PERFORMANCE_CHECK 0
166#define FABGLIB_CVBSCONTROLLER_PERFORMANCE_CHECK 0
167
168
169/************ Preset Resolution Modelines ************/
170
171// Modeline for 256x192@50Hz resolution - requires upscaler
172#define VGA_256x192_50Hz "\"256x192@50\" 8.13 256 288 296 328 192 196 198 202 -HSync -VSync DoubleScan"
173
175#define VGA_256x384_60Hz "\"256x384@60\" 17.09 256 272 304 352 384 387 391 404 -HSync -VSync DoubleScan"
176
177#define VGA_320x200_60HzD "\"320x200@60HzD\" 25.175 320 328 376 400 200 226 227 262 -HSync -VSync DoubleScan"
178
180#define VGA_320x200_70Hz "\"320x200@70Hz\" 12.5875 320 328 376 400 200 206 207 224 -HSync -VSync DoubleScan"
181
183#define VGA_320x200_75Hz "\"320x200@75Hz\" 12.93 320 352 376 408 200 208 211 229 -HSync -VSync DoubleScan"
184
186#define VGA_320x200_75HzRetro "\"320x200@75Hz\" 12.93 320 352 376 408 200 208 211 229 -HSync -VSync DoubleScan MultiScanBlank"
187
189#define QVGA_320x240_60Hz "\"320x240@60Hz\" 12.6 320 328 376 400 240 245 246 262 -HSync -VSync DoubleScan"
190
192#define VGA_400x300_60Hz "\"400x300@60Hz\" 20 400 420 484 528 300 300 302 314 -HSync -VSync DoubleScan"
193
195#define VGA_480x300_75Hz "\"480x300@75Hz\" 31.22 480 504 584 624 300 319 322 333 -HSync -VSync DoubleScan"
196
198#define VGA_512x192_60Hz "\"512x192@60Hz\" 32.5 512 524 592 672 192 193 194 202 -HSync -VSync QuadScan"
199
201#define VGA_512x384_60Hz "\"512x384@60Hz\" 32.5 512 524 592 672 384 385 388 403 -HSync -VSync DoubleScan"
202
204#define VGA_512x448_60Hz "\"512x448@60Hz\" 21.21 512 542 598 672 448 469 472 527 -HSync -VSync"
205
207#define VGA_512x512_58Hz "\"512x512@58Hz\" 21.21 512 538 594 668 512 513 516 545 -HSync -VSync"
208
210#define VGA_640x200_60HzD "\"640x200@60HzD\" 25.175 640 656 752 800 200 226 227 262 -HSync -VSync doublescan"
211
213#define VGA_640x200_70Hz "\"640x200@70Hz\" 25.175 640 656 752 800 200 206 207 224 -HSync -VSync DoubleScan"
214
216#define VGA_640x200_70HzRetro "\"640x200@70Hz\" 25.175 640 663 759 808 200 208 211 226 -HSync -VSync DoubleScan MultiScanBlank"
217
219#define VGA_640x240_60Hz "\"640x240@60Hz\" 25.175 640 656 752 800 240 245 247 262 -HSync -VSync DoubleScan"
220
221// Thanks to Paul Rickards (http://biosrhythm.com) - requires upscaler
222#define NTSC_640x240_60hz "\"NTSC 640x240 (60Hz)\" 12.312 640 662 719 784 240 244 247 262 -hsync -vsync"
223
225#define VGA_640x350_70Hz "\"640x350@70Hz\" 25.175 640 656 752 800 350 387 389 449 -HSync -VSync"
226
228#define VGA_640x350_70HzAlt1 "\"640x350@70HzAlt1\" 25.175 640 658 754 808 350 387 389 449 -HSync -VSync"
229
231#define VESA_640x350_85Hz "\"640x350@85Hz\" 31.5 640 672 736 832 350 382 385 445 -HSync -VSync"
232
234#define VGA_640x382_60Hz "\"640x382@60Hz\" 40 640 672 740 840 382 385 387 397 -HSync +VSync DoubleScan"
235
237#define VGA_640x384_60Hz "\"640x384@60Hz\" 40 640 672 740 840 384 384 386 397 -HSync +VSync DoubleScan"
238
240#define VGA_640x400_70Hz "\"640x400@70Hz\" 25.175 640 656 752 800 400 412 414 449 -HSync -VSync"
241
243#define VGA_640x400_60Hz "\"640x400@60Hz-mod\" 25.175 640 656 752 800 400 452 454 525 -HSync -VSync"
244
246#define VGA_640x480_60Hz "\"640x480@60Hz\" 25.175 640 656 752 800 480 490 492 525 -HSync -VSync"
247
249#define VGA_640x480_60HzAlt1 "\"640x480@60HzAlt1\" 27.5 640 672 768 864 480 482 488 530 -HSync -VSync"
250
252#define VGA_640x480_60HzD "\"640x480@60HzD\" 54.00 640 688 744 900 480 480 482 500 +HSync +VSync DoubleScan"
253
255#define VGA_640x480_73Hz "\"640x480@73Hz\" 31.5 640 664 704 832 480 489 491 520 -HSync -VSync"
256
258#define VESA_640x480_75Hz "\"640x480@75Hz\" 31.5 640 656 720 840 480 481 484 500 -HSync -VSync"
259
260// Thanks to Paul Rickards (http://biosrhythm.com) - requires upscaler
261#define NTSC_720x240_60hz "\"NTSC 720x240 (60Hz)\" 13.820 720 744 809 880 240 244 247 262 -hsync -vsync"
262
263// Thanks to Paul Rickards (http://biosrhythm.com) - requires upscaler
264#define PAL_720x288_50hz "\"PAL 720x288 (50Hz)\" 13.853 720 741 806 888 288 290 293 312 -hsync -vsync"
265
267#define VGA_720x348_50HzD "\"720x348@50HzD\" 30.84 720 752 808 840 348 355 358 366 -hsync -vsync doublescan"
268
270#define VGA_720x348_59HzD "\"720x348@59d\" 38.87 720 788 852 896 348 350 359 366 -HSync -VSync DoubleScan"
271
273#define VGA_720x348_73Hz "\"720x348@73Hz\" 27 720 736 799 872 348 379 381 433 -HSync -VSync"
274
276#define VGA_720x350_70Hz "\"720x350@70Hz\" 28.32 720 738 846 900 350 387 389 449 -HSync -VSync"
277
279#define VGA_720x400_70Hz "\"720x400@70Hz\" 28.32 720 738 846 900 400 412 414 449 -hsync +vsync"
280
282#define VESA_720x400_85Hz "\"720x400@85Hz\" 35.5 720 756 828 936 400 401 404 446 -HSync -VSync"
283
285#define PAL_720x576_50Hz "\"720x576@50Hz\" 27 720 732 795 864 576 581 586 625 -HSync -VSync"
286
287// Thanks to Paul Rickards (http://biosrhythm.com) - requires upscaler
288#define PAL_768x288_50hz "\"PAL 768x288 (50Hz)\" 14.726 768 790 859 944 288 290 293 312 -hsync -vsync"
289
291#define VESA_768x576_60Hz "\"768x576@60Hz\" 34.96 768 792 872 976 576 577 580 597 -HSync -VSync"
292
294#define SVGA_800x300_60Hz "\"800x300@60Hz\" 40 800 840 968 1056 300 301 303 314 -HSync -VSync DoubleScan"
295
297#define SVGA_800x600_56Hz "\"800x600@56Hz\" 36 800 824 896 1024 600 601 603 625 -HSync -VSync"
298
300#define SVGA_800x600_60Hz "\"800x600@60Hz\" 40 800 840 968 1056 600 601 605 628 -HSync -VSync"
301
303#define SVGA_960x540_60Hz "\"960x540@60Hz\" 37.26 960 976 1008 1104 540 542 548 563 +hsync +vsync"
304
306#define SVGA_1024x768_60Hz "\"1024x768@60Hz\" 65 1024 1048 1184 1344 768 771 777 806 -HSync -VSync"
307
309#define SVGA_1024x768_70Hz "\"1024x768@70Hz\" 75 1024 1048 1184 1328 768 771 777 806 -HSync -VSync"
310
312#define SVGA_1024x768_75Hz "\"1024x768@75Hz\" 78.80 1024 1040 1136 1312 768 769 772 800 +HSync +VSync"
313
315#define SVGA_1280x600_60Hz "\"1280x600@60Hz\" 61.5 1280 1336 1464 1648 600 601 604 622 -HSync -VSync"
316
318#define SVGA_1280x720_60Hz "\"1280x720@60Hz\" 74.48 1280 1468 1604 1664 720 721 724 746 +hsync +vsync"
319
321#define SVGA_1280x720_60HzAlt1 "\"1280x720@60HzAlt1\" 73.78 1280 1312 1592 1624 720 735 742 757"
322
324#define SVGA_1280x768_50Hz "\"1280x768@50Hz\" 64.050004 1280 1312 1552 1584 768 784 791 807 -HSync -VSync"
325
326
327
329#define OLED_128x64 "\"OLED_128x64\" 128 64"
330
332#define OLED_128x32 "\"OLED_128x32\" 128 32"
333
335#define TFT_240x240 "\"TFT_240x240\" 240 240"
336
338#define TFT_240x320 "\"TFT_240x320\" 240 320"
339
340
341
342