From 6ee13641cf3cf708fa7ba67f89d16651e3b2f2e0 Mon Sep 17 00:00:00 2001 From: Jacques Supcik Date: Mon, 21 Nov 2022 13:39:16 +0100 Subject: [PATCH] Enable HSPI configuration for ESP-IDF --- Kconfig | 15 +++++++++++++++ TFT_config.h | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/Kconfig b/Kconfig index b4efe20..f3c30be 100644 --- a/Kconfig +++ b/Kconfig @@ -212,6 +212,21 @@ menu "TFT_eSPI" menu "Display SPI config" depends on !TFT_PARALLEL_8_BIT + + choice TFT_SPI_PORT + prompt "SPI port" + default TFT_SPI_2_HOST + help + The ESP32 has 2 free SPI ports i.e. VSPI (SPI2) and HSPI (SPI3), + the VSPI is the default. If the VSPI port is in use and pins are + not accessible (e.g. TTGO T-Beam) then use the HSPI port for the + TFT display. + config TFT_VSPI_PORT + bool "VSPI (SPI2)" + config TFT_HSPI_PORT + bool "HSPI (SPI3)" + endchoice + config TFT_MISO int "TFT MISO pin" default -1 diff --git a/TFT_config.h b/TFT_config.h index 776d38a..c4d087b 100644 --- a/TFT_config.h +++ b/TFT_config.h @@ -223,6 +223,10 @@ // SPI BUS #else + #if CONFIG_TFT_HSPI_PORT + #define USE_HSPI_PORT + #endif + #if CONFIG_TFT_MISO != -1 #define TFT_MISO CONFIG_TFT_MISO #endif