From f960c83dd48d1a7d026340470757527b514e14ac Mon Sep 17 00:00:00 2001 From: moononournation Date: Sat, 11 May 2024 19:17:51 +0800 Subject: [PATCH] add LILYGO_T_Display_S3_LONG dev device support --- .../PDQgraphicstest/Arduino_GFX_dev_device.h | 26 +++++++++++++------ src/display/Arduino_AXS15231B.cpp | 2 +- src/display/Arduino_AXS15231B.h | 4 +-- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/examples/PDQgraphicstest/Arduino_GFX_dev_device.h b/examples/PDQgraphicstest/Arduino_GFX_dev_device.h index 7518da40..ecb8bd2a 100644 --- a/examples/PDQgraphicstest/Arduino_GFX_dev_device.h +++ b/examples/PDQgraphicstest/Arduino_GFX_dev_device.h @@ -26,6 +26,7 @@ // #define LILYGO_T_DISPLAY // #define LILYGO_T_DISPLAY_S3 // #define LILYGO_T_Display_S3_AMOLED +// #define LILYGO_T_Display_S3_LONG // #define LILYGO_T_DISPLAY_S3_PRO // #define LILYGO_T_QT // #define LILYGO_T_RGB @@ -375,8 +376,8 @@ Arduino_GFX *gfx = new Arduino_ST7789(bus, 12 /* RST */, 1 /* rotation */, true #define GFX_BL 1 Arduino_DataBus *bus = new Arduino_ESP32QSPI( 45 /* cs */, 47 /* sck */, 21 /* d0 */, 48 /* d1 */, 40 /* d2 */, 39 /* d3 */); -Arduino_GFX *g = new Arduino_AXS15231B(bus, GFX_NOT_DEFINED /* RST */, 0 /* rotation */, false /* IPS */); -Arduino_GFX *gfx = new Arduino_Canvas(320 /* width */, 480 /* height */, g); +Arduino_GFX *g = new Arduino_AXS15231B(bus, GFX_NOT_DEFINED /* RST */, 0 /* rotation */, false /* IPS */, 320 /* width */, 480 /* height */); +Arduino_GFX *gfx = new Arduino_Canvas(320 /* width */, 480 /* height */, g, 0 /* output_x */, 0 /* output_y */, 0 /* rotation */); #define CANVAS #elif defined(LILYGO_T_DECK) @@ -420,6 +421,21 @@ Arduino_DataBus *bus = new Arduino_ESP32QSPI( 6 /* cs */, 47 /* sck */, 18 /* d0 */, 7 /* d1 */, 48 /* d2 */, 5 /* d3 */); Arduino_GFX *gfx = new Arduino_RM67162(bus, 17 /* RST */, 0 /* rotation */); +#elif defined(LILYGO_T_Display_S3_LONG) +#define GFX_DEV_DEVICE LILYGO_T_DISPLAY_S3_LONG +#define GFX_BL 1 +Arduino_DataBus *bus = new Arduino_ESP32QSPI( + 12 /* cs */, 17 /* sck */, 13 /* d0 */, 18 /* d1 */, 21 /* d2 */, 14 /* d3 */); +Arduino_GFX *g = new Arduino_AXS15231B(bus, 47 /* RST */, 0 /* rotation */, false /* IPS */, 180 /* width */, 640 /* height */); +Arduino_GFX *gfx = new Arduino_Canvas(180 /* width */, 640 /* height */, g, 0 /* output_x */, 0 /* output_y */, 0 /* rotation */); +#define CANVAS + +#elif defined(LILYGO_T_DISPLAY_S3_PRO) +#define GFX_DEV_DEVICE LILYGO_T_DISPLAY_S3_PRO +#define GFX_BL 48 +Arduino_DataBus *bus = new Arduino_ESP32SPI(9 /* DC */, 39 /* CS */, 18 /* SCK */, 17 /* MOSI */, 8 /* MISO */); +Arduino_GFX *gfx = new Arduino_ST7796(bus, 47 /* RST */, 0 /* rotation */, true /* IPS */, 222 /* width */, 480 /* height */, 49 /* col offset 1 */, 0 /* row offset 1 */, 49 /* col offset 2 */, 0 /* row offset 2 */); + #elif defined(LILYGO_T_QT) #define GFX_DEV_DEVICE LILYGO_T_QT #define GFX_EXTRA_PRE_INIT() \ @@ -430,12 +446,6 @@ Arduino_GFX *gfx = new Arduino_RM67162(bus, 17 /* RST */, 0 /* rotation */); Arduino_DataBus *bus = new Arduino_ESP32SPI(6 /* DC */, 5 /* CS */, 3 /* SCK */, 2 /* MOSI */, GFX_NOT_DEFINED /* MISO */); Arduino_GFX *gfx = new Arduino_GC9107(bus, 1 /* RST */, 0 /* rotation */, true /* IPS */); -#elif defined(LILYGO_T_DISPLAY_S3_PRO) -#define GFX_DEV_DEVICE LILYGO_T_DISPLAY_S3_PRO -#define GFX_BL 48 -Arduino_DataBus *bus = new Arduino_ESP32SPI(9 /* DC */, 39 /* CS */, 18 /* SCK */, 17 /* MOSI */, 8 /* MISO */); -Arduino_GFX *gfx = new Arduino_ST7796(bus, 47 /* RST */, 0 /* rotation */, true /* IPS */, 222 /* width */, 480 /* height */, 49 /* col offset 1 */, 0 /* row offset 1 */, 49 /* col offset 2 */, 0 /* row offset 2 */); - #elif defined(LILYGO_T_RGB) #define GFX_DEV_DEVICE LILYGO_T_RGB #include diff --git a/src/display/Arduino_AXS15231B.cpp b/src/display/Arduino_AXS15231B.cpp index d3411417..2bf1bbaa 100644 --- a/src/display/Arduino_AXS15231B.cpp +++ b/src/display/Arduino_AXS15231B.cpp @@ -17,7 +17,7 @@ bool Arduino_AXS15231B::begin(int32_t speed) { if (speed == GFX_NOT_DEFINED) { - speed = 40000000UL; // AXS15231B Maximum supported speed + speed = 32000000UL; // AXS15231B Maximum supported speed } return Arduino_TFT::begin(speed); } diff --git a/src/display/Arduino_AXS15231B.h b/src/display/Arduino_AXS15231B.h index 50938ede..cbd773b6 100644 --- a/src/display/Arduino_AXS15231B.h +++ b/src/display/Arduino_AXS15231B.h @@ -9,8 +9,8 @@ #include "../Arduino_GFX.h" #include "../Arduino_TFT.h" -#define AXS15231B_TFTWIDTH 320 -#define AXS15231B_TFTHEIGHT 480 +#define AXS15231B_TFTWIDTH 360 +#define AXS15231B_TFTHEIGHT 640 #define AXS15231B_RST_DELAY 200 ///< delay ms wait for reset finish #define AXS15231B_SLPIN_DELAY 120 ///< delay ms wait for sleep in finish