From e17ad53809e56343276b922c5f6173d901731ca4 Mon Sep 17 00:00:00 2001 From: bonaime Date: Wed, 24 Nov 2021 11:07:24 +0100 Subject: [PATCH] Setup for the ESP32 S2 with ST7789 display --- User_Setup_Select.h | 2 ++ User_Setups/Setup71_ESP32_S2_ST7789.h | 29 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 User_Setups/Setup71_ESP32_S2_ST7789.h diff --git a/User_Setup_Select.h b/User_Setup_Select.h index da009a3..41b6cd6 100644 --- a/User_Setup_Select.h +++ b/User_Setup_Select.h @@ -83,6 +83,8 @@ //#include // Setup file for ESP32 S2 with SPI ILI9341 +//#include // Setup file for ESP32 S2 with ST7789 + //#include // Setup file for ESP8266 and ST7789 135 x 240 TFT //#include // Setup file for ESP32 and Lilygo TTV ST7789 SPI bus TFT 135x240 diff --git a/User_Setups/Setup71_ESP32_S2_ST7789.h b/User_Setups/Setup71_ESP32_S2_ST7789.h new file mode 100644 index 0000000..509b0a2 --- /dev/null +++ b/User_Setups/Setup71_ESP32_S2_ST7789.h @@ -0,0 +1,29 @@ +// Setup for the ESP32 S2 with ILI9341 display +// Note SPI DMA with ESP32 S2 is not currently supported + +// See SetupX_Template.h for all options available + +#define ST7789_DRIVER // Configure all registers + + +#define TFT_CS 34 // 10 or 34 +#define TFT_MOSI 35 // 11 or 35 +#define TFT_SCLK 37 // 12 or 36 +#define TFT_MISO 36 // 13 or 37 + +#define TFT_DC 33 +#define TFT_RST -1 + +#define LOAD_GLCD +#define LOAD_FONT2 +#define LOAD_FONT4 +#define LOAD_FONT6 +#define LOAD_FONT7 +#define LOAD_FONT8 +#define LOAD_GFXFF + +#define SMOOTH_FONT + +#define SPI_FREQUENCY 27000000 + +#define SPI_TOUCH_FREQUENCY 2500000