Fix SPI configuration for ESP32-C3 and ESP32-S2
ESP32-C3 and ESP32-S2 do not have VSPI or HSPI
This commit is contained in:
parent
f3f6ba6470
commit
31a5733c8d
|
@ -65,15 +65,13 @@ extern "C" {
|
|||
#define ENABLE_TOUCH_INPUT CONFIG_LV_ENABLE_TOUCH
|
||||
|
||||
#if defined (CONFIG_LV_TFT_DISPLAY_SPI_HSPI)
|
||||
#if defined (CONFIG_IDF_TARGET_ESP32C3)
|
||||
#define TFT_SPI_HOST SPI2_HOST
|
||||
#else
|
||||
#define TFT_SPI_HOST HSPI_HOST
|
||||
#endif
|
||||
#elif defined (CONFIG_LV_TFT_DISPLAY_SPI_VSPI)
|
||||
#define TFT_SPI_HOST VSPI_HOST
|
||||
#elif defined (CONFIG_LV_TFT_DISPLAY_SPI_FSPI)
|
||||
#define TFT_SPI_HOST FSPI_HOST
|
||||
#elif defined (CONFIG_LV_TFT_DISPLAY_SPI2)
|
||||
#define TFT_SPI_HOST SPI2_HOST
|
||||
#endif
|
||||
|
||||
#if defined (CONFIG_LV_TFT_DISPLAY_SPI_HALF_DUPLEX)
|
||||
|
|
|
@ -476,11 +476,13 @@ menu "LVGL TFT Display controller"
|
|||
Select the SPI Bus the TFT Display is attached to.
|
||||
|
||||
config LV_TFT_DISPLAY_SPI_HSPI
|
||||
bool "HSPI"
|
||||
bool "HSPI" if IDF_TARGET_ESP32
|
||||
config LV_TFT_DISPLAY_SPI_VSPI
|
||||
bool "VSPI" if !IDF_TARGET_ESP32S2
|
||||
bool "VSPI" if IDF_TARGET_ESP32
|
||||
config LV_TFT_DISPLAY_SPI_FSPI
|
||||
bool "FSPI" if IDF_TARGET_ESP32S2
|
||||
config LV_TFT_DISPLAY_SPI2
|
||||
bool "SPI2" if IDF_TARGET_ESP32C3
|
||||
endchoice
|
||||
|
||||
choice
|
||||
|
|
Loading…
Reference in a new issue