46
46
// #define XIAO_SAMD21_ROUND_DISPLAY
47
47
// #define XIAO_ESP32C3_ROUND_DISPLAY
48
48
// #define XIAO_ESP32S3_ROUND_DISPLAY
49
+ // #define WAVESHARE_ESP32_S3_LCD_2_8
49
50
// #define WAVESHARE_RP2040_LCD_0_96
50
51
// #define WZ8048C050 // or called "Elecrow Wizee-ESP32"
51
52
// #define ZX2D10GE10R_V4848
59
60
#include <Wire.h>
60
61
#include <Adafruit_AW9523.h>
61
62
Adafruit_AW9523 aw ;
62
- #define DEV_DEVICE_INIT () \
63
- { \
64
- Wire.begin(6 /* SDA */ , 5 /* SCL */ ); \
65
- aw .begin (0x59 ); \
66
- aw .pinMode (8 , OUTPUT ); /* LCD_LEDK */ \
67
- aw .pinMode (9 , OUTPUT ); /* LCD_LEDK */ \
68
- aw .pinMode (10 , OUTPUT ); /* LCD_LEDK */ \
69
- aw .pinMode (11 , OUTPUT ); /* LCD_LEDK */ \
70
- aw .pinMode (14 , OUTPUT ); /* LCD_RST */ \
71
- aw .digitalWrite (8 , LOW ); /* LCD_LEDK */ \
72
- aw .digitalWrite (9 , LOW ); /* LCD_LEDK */ \
73
- aw .digitalWrite (10 , LOW ); /* LCD_LEDK */ \
74
- aw .digitalWrite (11 , LOW ); /* LCD_LEDK */ \
75
- aw .digitalWrite (14 , HIGH ); /* LCD_RST */ \
76
- }
63
+ #define DEV_DEVICE_INIT () \
64
+ { \
65
+ Wire.begin(6 /* SDA */ , 5 /* SCL */ ); \
66
+ aw .begin (0x59 ); \
67
+ aw .pinMode (8 , OUTPUT ); /* LCD_LEDK */ \
68
+ aw .pinMode (9 , OUTPUT ); /* LCD_LEDK */ \
69
+ aw .pinMode (10 , OUTPUT ); /* LCD_LEDK */ \
70
+ aw .pinMode (11 , OUTPUT ); /* LCD_LEDK */ \
71
+ aw .pinMode (14 , OUTPUT ); /* LCD_RST */ \
72
+ aw .digitalWrite (8 , LOW ); /* LCD_LEDK */ \
73
+ aw .digitalWrite (9 , LOW ); /* LCD_LEDK */ \
74
+ aw .digitalWrite (10 , LOW ); /* LCD_LEDK */ \
75
+ aw .digitalWrite (11 , LOW ); /* LCD_LEDK */ \
76
+ aw .digitalWrite (14 , HIGH ); /* LCD_RST */ \
77
+ }
77
78
Arduino_DataBus * bus = new Arduino_ESP32LCD8 (
78
79
45 /* DC */ , GFX_NOT_DEFINED /* CS */ , 10 /* WR */ , GFX_NOT_DEFINED /* RD */ ,
79
80
9 /* D0 */ , 4 /* D1 */ , 3 /* D2 */ , 8 /* D3 */ , 18 /* D4 */ , 17 /* D5 */ , 16 /* D6 */ , 15 /* D7 */ );
@@ -293,13 +294,13 @@ Arduino_GFX *gfx = new Arduino_ILI9342(bus, GFX_NOT_DEFINED /* RST */, 0 /* rota
293
294
294
295
#elif defined(ESP32_S3_EYE )
295
296
#define GFX_DEV_DEVICE ESP32_S3_EYE
296
- #define DEV_DEVICE_INIT () \
297
- { \
298
- pinMode(3 /* camera indicator */ , OUTPUT ); \
299
- digitalWrite(3 /* camera indicator */ , LOW ); \
300
- pinMode(48 /* BACKLIGHT */ , OUTPUT ); \
301
- digitalWrite(48 /* BACKLIGHT */ , LOW ); \
302
- }
297
+ #define DEV_DEVICE_INIT () \
298
+ { \
299
+ pinMode(3 /* camera indicator */ , OUTPUT ); \
300
+ digitalWrite(3 /* camera indicator */ , LOW ); \
301
+ pinMode(48 /* BACKLIGHT */ , OUTPUT ); \
302
+ digitalWrite(48 /* BACKLIGHT */ , LOW ); \
303
+ }
303
304
Arduino_DataBus * bus = new Arduino_ESP32SPI (43 /* DC */ , 44 /* CS */ , 21 /* SCK */ , 47 /* MOSI */ , GFX_NOT_DEFINED /* MISO */ );
304
305
Arduino_GFX * gfx = new Arduino_ST7789 (bus , GFX_NOT_DEFINED /* RST */ , 0 /* rotation */ , true /* IPS */ , 240 /* width */ , 240 /* height */ , 0 /* col offset 1 */ , 0 /* row offset 1 */ , 0 /* col offset 2 */ , 80 /* row offset 2 */ );
305
306
@@ -441,12 +442,12 @@ Arduino_GFX *gfx = new Arduino_ST7789(bus, 12 /* RST */, 1 /* rotation */, true
441
442
#define GFX_BL 23 // default backlight pin, you may replace DF_GFX_BL to actual backlight pin
442
443
#define DSI_PANEL
443
444
Arduino_ESP32DSIPanel * dsipanel = new Arduino_ESP32DSIPanel (
444
- 40 /* hsync_pulse_width */ , 160 /* hsync_back_porch */ , 160 /* hsync_front_porch */ ,
445
- 10 /* vsync_pulse_width */ , 23 /*vsync_back_porch */ , 12 /* vsync_front_porch */ ,
446
- 48000000 /* prefer_speed */ );
445
+ 40 /* hsync_pulse_width */ , 160 /* hsync_back_porch */ , 160 /* hsync_front_porch */ ,
446
+ 10 /* vsync_pulse_width */ , 23 /*vsync_back_porch */ , 12 /* vsync_front_porch */ ,
447
+ 48000000 /* prefer_speed */ );
447
448
Arduino_DSI_Display * gfx = new Arduino_DSI_Display (
448
- 1024 /* width */ , 600 /* height */ , dsipanel , 0 /* rotation */ , true /* auto_flush */ ,
449
- 27 /* RST */ , jd9165_init_operations , sizeof (jd9165_init_operations ) / sizeof (lcd_init_cmd_t ));
449
+ 1024 /* width */ , 600 /* height */ , dsipanel , 0 /* rotation */ , true /* auto_flush */ ,
450
+ 27 /* RST */ , jd9165_init_operations , sizeof (jd9165_init_operations ) / sizeof (lcd_init_cmd_t ));
450
451
451
452
#elif defined(JC3248W535 )
452
453
#define GFX_DEV_DEVICE JC3248W535
@@ -466,18 +467,18 @@ Arduino_GFX *gfx = new Arduino_ST77916(bus, 47 /* RST */, 0 /* rotation */, true
466
467
467
468
#elif defined(LILYGO_T_DECK )
468
469
#define GFX_DEV_DEVICE LILYGO_T_DECK
469
- #define DEV_DEVICE_INIT () \
470
- { \
471
- pinMode(9 /* TDECK_RADIO_CS */ , OUTPUT ); \
472
- digitalWrite(9 /* TDECK_RADIO_CS */ , HIGH ); \
473
- pinMode(12 /* TDECK_LCD_CS */ , OUTPUT ); \
474
- digitalWrite(12 /* TDECK_LCD_CS */ , HIGH ); \
475
- pinMode(39 /* TDECK_SDCARD_CS */ , OUTPUT ); \
476
- digitalWrite(39 /* TDECK_SDCARD_CS */ , HIGH ); \
477
- pinMode(10 /* TDECK_PERI_POWERON */ , OUTPUT ); \
478
- digitalWrite(10 /* TDECK_PERI_POWERON */ , HIGH ); \
479
- delay(500); \
480
- }
470
+ #define DEV_DEVICE_INIT () \
471
+ { \
472
+ pinMode(9 /* TDECK_RADIO_CS */ , OUTPUT ); \
473
+ digitalWrite(9 /* TDECK_RADIO_CS */ , HIGH ); \
474
+ pinMode(12 /* TDECK_LCD_CS */ , OUTPUT ); \
475
+ digitalWrite(12 /* TDECK_LCD_CS */ , HIGH ); \
476
+ pinMode(39 /* TDECK_SDCARD_CS */ , OUTPUT ); \
477
+ digitalWrite(39 /* TDECK_SDCARD_CS */ , HIGH ); \
478
+ pinMode(10 /* TDECK_PERI_POWERON */ , OUTPUT ); \
479
+ digitalWrite(10 /* TDECK_PERI_POWERON */ , HIGH ); \
480
+ delay(500); \
481
+ }
481
482
#define GFX_BL 42
482
483
Arduino_DataBus * bus = new Arduino_ESP32SPI (11 /* DC */ , 12 /* CS */ , 40 /* SCK */ , 41 /* MOSI */ , 38 /* MISO */ );
483
484
Arduino_GFX * gfx = new Arduino_ST7789 (bus , GFX_NOT_DEFINED /* RST */ , 1 /* rotation */ , false /* IPS */ );
@@ -490,11 +491,11 @@ Arduino_GFX *gfx = new Arduino_ST7789(bus, 23 /* RST */, 0 /* rotation */, true
490
491
491
492
#elif defined(LILYGO_T_DISPLAY_S3 )
492
493
#define GFX_DEV_DEVICE LILYGO_T_DISPLAY_S3
493
- #define DEV_DEVICE_INIT () \
494
- { \
495
- pinMode(15 /* PWD */ , OUTPUT ); \
496
- digitalWrite(15 /* PWD */ , HIGH ); \
497
- }
494
+ #define DEV_DEVICE_INIT () \
495
+ { \
496
+ pinMode(15 /* PWD */ , OUTPUT ); \
497
+ digitalWrite(15 /* PWD */ , HIGH ); \
498
+ }
498
499
#define GFX_BL 38
499
500
Arduino_DataBus * bus = new Arduino_ESP32PAR8Q (
500
501
7 /* DC */ , 6 /* CS */ , 8 /* WR */ , 9 /* RD */ ,
@@ -509,11 +510,11 @@ Arduino_GFX *gfx = new Arduino_RM67162(bus, 17 /* RST */, 0 /* rotation */);
509
510
510
511
#elif defined(LILYGO_T_Display_S3_AMOLED_1_64 )
511
512
#define GFX_DEV_DEVICE LILYGO_T_DISPLAY_S3_AMOLED_1_64
512
- #define DEV_DEVICE_INIT () \
513
- { \
514
- pinMode(16 /* LCD_EN */ , OUTPUT ); \
515
- digitalWrite(16 /* LCD_EN */ , HIGH ); \
516
- }
513
+ #define DEV_DEVICE_INIT () \
514
+ { \
515
+ pinMode(16 /* LCD_EN */ , OUTPUT ); \
516
+ digitalWrite(16 /* LCD_EN */ , HIGH ); \
517
+ }
517
518
Arduino_DataBus * bus = new Arduino_ESP32QSPI (
518
519
10 /* CS */ , 12 /* SCK */ , 11 /* D0 */ , 13 /* D1 */ , 14 /* D2 */ , 15 /* D3 */ );
519
520
Arduino_GFX * g = new Arduino_CO5300 (bus , 17 /* RST */ , 0 /* rotation */ , false /* IPS */ , 280 , 456 ,
@@ -538,21 +539,21 @@ Arduino_GFX *gfx = new Arduino_ST7796(bus, 47 /* RST */, 0 /* rotation */, true
538
539
539
540
#elif defined(LILYGO_T_QT )
540
541
#define GFX_DEV_DEVICE LILYGO_T_QT
541
- #define DEV_DEVICE_INIT () \
542
- { \
543
- pinMode(10 /* BL */ , OUTPUT ); \
544
- digitalWrite(10 /* BL */ , LOW ); \
545
- }
542
+ #define DEV_DEVICE_INIT () \
543
+ { \
544
+ pinMode(10 /* BL */ , OUTPUT ); \
545
+ digitalWrite(10 /* BL */ , LOW ); \
546
+ }
546
547
Arduino_DataBus * bus = new Arduino_ESP32SPI (6 /* DC */ , 5 /* CS */ , 3 /* SCK */ , 2 /* MOSI */ , GFX_NOT_DEFINED /* MISO */ );
547
548
Arduino_GFX * gfx = new Arduino_GC9107 (bus , 1 /* RST */ , 0 /* rotation */ , true /* IPS */ );
548
549
549
550
#elif defined(LILYGO_T_RGB )
550
551
#define GFX_DEV_DEVICE LILYGO_T_RGB
551
552
#include <Wire.h>
552
- #define DEV_DEVICE_INIT () \
553
- { \
554
- Wire.begin(8 /* SDA */ , 48 /* SCL */ , 800000L /* speed */ ); \
555
- }
553
+ #define DEV_DEVICE_INIT () \
554
+ { \
555
+ Wire.begin(8 /* SDA */ , 48 /* SCL */ , 800000L /* speed */ ); \
556
+ }
556
557
#define GFX_BL 46
557
558
Arduino_DataBus * bus = new Arduino_XL9535SWSPI (
558
559
8 /* SDA */ , 48 /* SCL */ , 2 /* XL PWD */ , 3 /* XL CS */ , 5 /* XL SCK */ , 4 /* XL MOSI */ );
@@ -571,11 +572,11 @@ Arduino_RGB_Display *gfx = new Arduino_RGB_Display(
571
572
572
573
#elif defined(LILYGO_T_TRACK )
573
574
#define GFX_DEV_DEVICE LILYGO_T_TRACK
574
- #define DEV_DEVICE_INIT () \
575
- { \
576
- pinMode(4 /* POWER */ , OUTPUT ); \
577
- digitalWrite(4 /* POWER */ , HIGH ); \
578
- }
575
+ #define DEV_DEVICE_INIT () \
576
+ { \
577
+ pinMode(4 /* POWER */ , OUTPUT ); \
578
+ digitalWrite(4 /* POWER */ , HIGH ); \
579
+ }
579
580
Arduino_DataBus * bus = new Arduino_ESP32SPIDMA (7 /* DC */ , 9 /* CS */ , 5 /* SCK */ , 6 /* MOSI */ , GFX_NOT_DEFINED /* MISO */ );
580
581
Arduino_G * g = new Arduino_JD9613 (bus , 8 /* RST */ );
581
582
#define CANVAS
@@ -589,11 +590,11 @@ Arduino_GFX *gfx = new Arduino_GC9A01(bus, 27 /* RST */, 0 /* rotation */, true
589
590
590
591
#elif defined(LILYGO_T4_S3 )
591
592
#define GFX_DEV_DEVICE LILYGO_T4_S3
592
- #define DEV_DEVICE_INIT () \
593
- { \
594
- pinMode(9 /* POWER */ , OUTPUT ); \
595
- digitalWrite(9 /* POWER */ , HIGH ); \
596
- }
593
+ #define DEV_DEVICE_INIT () \
594
+ { \
595
+ pinMode(9 /* POWER */ , OUTPUT ); \
596
+ digitalWrite(9 /* POWER */ , HIGH ); \
597
+ }
597
598
Arduino_DataBus * bus = new Arduino_ESP32QSPI (
598
599
11 /* CS */ , 15 /* SCK */ , 14 /* D0 */ , 10 /* D1 */ , 16 /* D2 */ , 12 /* D3 */ );
599
600
Arduino_GFX * g = new Arduino_RM690B0 (bus , 13 /* RST */ , 0 /* rotation */ , 450 /* width */ , 600 /* height */ , 16 /* col offset 1 */ , 0 /* row offset 1 */ , 16 /* col offset 2 */ , 0 /* row offset 2 */ );
@@ -658,6 +659,12 @@ Arduino_ESP32RGBPanel *rgbpanel = new Arduino_ESP32RGBPanel(
658
659
Arduino_RGB_Display * gfx = new Arduino_RGB_Display (
659
660
800 /* width */ , 480 /* height */ , rgbpanel , 0 /* rotation */ , true /* auto_flush */ );
660
661
662
+ #elif defined(WAVESHARE_ESP32_S3_LCD_2_8 )
663
+ #define GFX_DEV_DEVICE WAVESHARE_ESP32_S3_LCD_2_8
664
+ #define GFX_BL 5
665
+ Arduino_DataBus * bus = new Arduino_HWSPI (41 /* DC */ , 42 /* CS */ , 40 /* SCK */ , 45 /* MOSI */ , 46 /* MISO */ );
666
+ Arduino_GFX * gfx = new Arduino_ST7789 (bus , 39 /* RST */ , 0 /* rotation */ , true /* IPS */ );
667
+
661
668
#elif defined(WAVESHARE_RP2040_LCD_0_96 )
662
669
#define GFX_DEV_DEVICE WAVESHARE_RP2040_LCD_0_96
663
670
#define GFX_BL 25
0 commit comments