From cf66ae3148623edf254d621ba51c469b35a8fddf Mon Sep 17 00:00:00 2001 From: Linar Yusupov Date: Tue, 4 Jan 2022 12:27:39 +0300 Subject: [PATCH] User Setup for the TTGO T-Display S2 --- User_Setup_Select.h | 3 ++- User_Setups/Setup72_TTGO_T_Display_S2.h | 30 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 User_Setups/Setup72_TTGO_T_Display_S2.h diff --git a/User_Setup_Select.h b/User_Setup_Select.h index a54bba8..40b6e83 100644 --- a/User_Setup_Select.h +++ b/User_Setup_Select.h @@ -83,7 +83,8 @@ //#include // Setup file for ESP32 S2 with SPI ILI9341 -//#include // Setup file for ESP32 S2 with ST7789 +//#include // Setup file for ESP32 S2 with ST7789 +//#include // Setup file for ESP32-S2 and TTGO T-Display S2 ST7789 SPI TFT 135x240 //#include //#include diff --git a/User_Setups/Setup72_TTGO_T_Display_S2.h b/User_Setups/Setup72_TTGO_T_Display_S2.h new file mode 100644 index 0000000..26553c1 --- /dev/null +++ b/User_Setups/Setup72_TTGO_T_Display_S2.h @@ -0,0 +1,30 @@ +// Setup for the TTGO T-Display S2 +// Note SPI DMA with ESP32 S2 is not currently supported + +// See SetupX_Template.h for all options available + +#define TFT_WIDTH 135 +#define TFT_HEIGHT 240 +#define ST7789_DRIVER // Configure all registers + +#define USE_HSPI_PORT + +#define TFT_MISO -1 +#define TFT_MOSI 35 +#define TFT_SCLK 36 +#define TFT_CS 34 +#define TFT_DC 37 +#define TFT_RST 38 +#define TFT_BL 33 + +#define LOAD_GLCD +#define LOAD_FONT2 +#define LOAD_FONT4 +#define LOAD_FONT6 +#define LOAD_FONT7 +#define LOAD_FONT8 +#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts +#define SMOOTH_FONT + +#define SPI_FREQUENCY 27000000 +#define SPI_TOUCH_FREQUENCY 2500000