diff --git a/lib/TFT_eSPI/User_Setup_Select.h b/lib/TFT_eSPI/User_Setup_Select.h index 2ebed601..a96ff517 100644 --- a/lib/TFT_eSPI/User_Setup_Select.h +++ b/lib/TFT_eSPI/User_Setup_Select.h @@ -142,7 +142,9 @@ //#include // For the ESP32 S3 Box Lite (may also work with ESP32 S3 Box) //#include // For the LilyGo T-Dongle S3 based ESP32 with ST7735 80 x 160 TFT -// #include // For the LilyGo T-Embed S3 based ESP32S3 with ST7789 170 x 320 TFT +#ifdef LILYGO_S3_T_EMBED +#include // For the LilyGo T-Embed S3 based ESP32S3 with ST7789 170 x 320 TFT +#endif #ifdef NERMINER_T_QT #include // For the LilyGo T-QT Pro S3 based ESP32S3 with GC9A01 128 x 128 TFT #endif diff --git a/platformio.ini b/platformio.ini index effc7ac6..2574ea7a 100644 --- a/platformio.ini +++ b/platformio.ini @@ -10,7 +10,7 @@ [platformio] globallib_dir = lib -default_envs = M5Stick-C, esp32cam, ESP32-2432S028R, NerminerV2, ESP32-devKitv1, NerminerV2-S3-DONGLE, NerminerV2-S3-AMOLED, NerminerV2-T-QT, NerdminerV2-T-Display_V1, ESP32-2432S028R, M5-StampS3, ESP32-S3-devKitv1, ESP32-S3-mini-wemos, ESP32-S3-mini-weact, ESP32-C3-devKitmv1, ESP32-C3-super-mini +default_envs = M5Stick-C, esp32cam, ESP32-2432S028R, NerminerV2, Lilygo-T-Embed, ESP32-devKitv1, NerminerV2-S3-DONGLE, NerminerV2-S3-AMOLED, NerminerV2-T-QT, NerdminerV2-T-Display_V1, ESP32-2432S028R, M5-StampS3, ESP32-S3-devKitv1, ESP32-S3-mini-wemos, ESP32-S3-mini-weact, ESP32-C3-devKitmv1, ESP32-C3-super-mini [env:M5Stick-C] platform = espressif32 @@ -227,6 +227,39 @@ lib_deps = ;-------------------------------------------------------------------- +[env:Lilygo-T-Embed] +platform = espressif32 +board = esp32-s3-devkitc-1 +framework = arduino +monitor_filters = + esp32_exception_decoder + time + log2file +board_build.arduino.memory_type = qio_opi +monitor_speed = 115200 +upload_speed = 115200 +# 2 x 4.5MB app, 6.875MB SPIFFS +;board_build.partitions = large_spiffs_16MB.csv +;board_build.partitions = default_8MB.csv +board_build.partitions = huge_app.csv +;board_build.partitions = default.csv +build_flags = + -D LV_LVGL_H_INCLUDE_SIMPLE + -D BOARD_HAS_PSRAM + -D ARDUINO_USB_MODE=1 + -D ARDUINO_USB_CDC_ON_BOOT=1 + -D LILYGO_S3_T_EMBED=1 + ;-D DEBUG_MINING=1 +lib_deps = + https://github.com/takkaO/OpenFontRender + bblanchon/ArduinoJson@^6.21.2 + https://github.com/tzapu/WiFiManager.git#v2.0.16-rc.2 + mathertel/OneButton @ ^2.0.3 + arduino-libraries/NTPClient + ;https://github.com/golden-guy/Arduino_wolfssl.git#v5.5.4 + +;-------------------------------------------------------------------- + [env:ESP32-devKitv1] platform = espressif32 board = esp32dev diff --git a/src/drivers/devices/device.h b/src/drivers/devices/device.h index bd6b7596..47b6b165 100644 --- a/src/drivers/devices/device.h +++ b/src/drivers/devices/device.h @@ -13,6 +13,8 @@ #include "lilygoS3Amoled.h" #elif defined(NERMINER_S3_DONGLE) #include "lilygoS3Dongle.h" +#elif defined(LILYGO_S3_T_EMBED) +#include "lilygoS3TEmbed.h" #elif defined(ESP32_2432S028R) #include "esp322432s028r.h" #elif defined(NERMINER_T_QT) diff --git a/src/drivers/devices/lilygoS3TEmbed.h b/src/drivers/devices/lilygoS3TEmbed.h new file mode 100644 index 00000000..3b774b91 --- /dev/null +++ b/src/drivers/devices/lilygoS3TEmbed.h @@ -0,0 +1,9 @@ +#ifndef _LILYGO_S3_T_EMBED_H +#define _LILYGO_S3_T_EMBED_H + +#define PIN_BUTTON_1 0 +#define PIN_ENABLE5V 46 + +#define T_DISPLAY + +#endif \ No newline at end of file diff --git a/src/drivers/displays/tDisplayDriver.cpp b/src/drivers/displays/tDisplayDriver.cpp index c13d966e..e78d00d2 100644 --- a/src/drivers/displays/tDisplayDriver.cpp +++ b/src/drivers/displays/tDisplayDriver.cpp @@ -20,7 +20,11 @@ TFT_eSprite background = TFT_eSprite(&tft); // Invoke library sprite void tDisplay_Init(void) { tft.init(); + #ifdef LILYGO_S3_T_EMBED + tft.setRotation(3); + #else tft.setRotation(1); + #endif tft.setSwapBytes(true); // Swap the colour byte order when rendering background.createSprite(WIDTH, HEIGHT); // Background Sprite background.setSwapBytes(true);