Skip to content

Commit 31a5733

Browse files
committed
Fix SPI configuration for ESP32-C3 and ESP32-S2
ESP32-C3 and ESP32-S2 do not have VSPI or HSPI
1 parent f3f6ba6 commit 31a5733

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lvgl_spi_conf.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,13 @@ extern "C" {
6565
#define ENABLE_TOUCH_INPUT CONFIG_LV_ENABLE_TOUCH
6666

6767
#if defined (CONFIG_LV_TFT_DISPLAY_SPI_HSPI)
68-
#if defined (CONFIG_IDF_TARGET_ESP32C3)
69-
#define TFT_SPI_HOST SPI2_HOST
70-
#else
7168
#define TFT_SPI_HOST HSPI_HOST
72-
#endif
7369
#elif defined (CONFIG_LV_TFT_DISPLAY_SPI_VSPI)
7470
#define TFT_SPI_HOST VSPI_HOST
7571
#elif defined (CONFIG_LV_TFT_DISPLAY_SPI_FSPI)
7672
#define TFT_SPI_HOST FSPI_HOST
73+
#elif defined (CONFIG_LV_TFT_DISPLAY_SPI2)
74+
#define TFT_SPI_HOST SPI2_HOST
7775
#endif
7876

7977
#if defined (CONFIG_LV_TFT_DISPLAY_SPI_HALF_DUPLEX)

lvgl_tft/Kconfig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,11 +476,13 @@ menu "LVGL TFT Display controller"
476476
Select the SPI Bus the TFT Display is attached to.
477477

478478
config LV_TFT_DISPLAY_SPI_HSPI
479-
bool "HSPI"
479+
bool "HSPI" if IDF_TARGET_ESP32
480480
config LV_TFT_DISPLAY_SPI_VSPI
481-
bool "VSPI" if !IDF_TARGET_ESP32S2
481+
bool "VSPI" if IDF_TARGET_ESP32
482482
config LV_TFT_DISPLAY_SPI_FSPI
483483
bool "FSPI" if IDF_TARGET_ESP32S2
484+
config LV_TFT_DISPLAY_SPI2
485+
bool "SPI2" if IDF_TARGET_ESP32C3
484486
endchoice
485487

486488
choice

0 commit comments

Comments
 (0)