除了修改 驱动器名称
// Only define one driver, the other ones must be commented out //#define ILI9341_DRIVER // Generic driver for common displays //#define ILI9341_2_DRIVER // Alternative ILI9341 driver, see https://github.com/Bodmer/TFT_eSPI/issues/1172 #define ST7735_DRIVER // Define additional parameters below for this display //#define ILI9163_DRIVER // Define additional parameters below for this display
引脚定义为GPIO的编号 而不是引脚顺序
//#define TFT_MISO 13 #define TFT_MOSI 17 #define TFT_SCLK 18 #define TFT_CS 21 // Chip select control pin #define TFT_DC 16 // Data Command control pin #define TFT_RST 15 // Reset pin (could connect to RST pin) //#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST
非常重要 否则无法驱动!
// The ESP32 has 2 free SPI ports i.e. VSPI and HSPI, the VSPI is the default. // If the VSPI port is in use and pins are not accessible (e.g. TTGO T-Beam) // then uncomment the following line: //ESP32 S3非常重要需要这个 #define USE_HSPI_PORT