Merge pull request #145 from arktrin/fix-spi-conf
Fix SPI configuration for ESP32C3 and ESP32S2
This commit is contained in:
commit
4afc03a9fa
|
@ -64,16 +64,12 @@ 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
|
||||
#if defined (CONFIG_LV_TFT_DISPLAY_SPI1_HOST)
|
||||
#define TFT_SPI_HOST SPI1_HOST
|
||||
#elif defined (CONFIG_LV_TFT_DISPLAY_SPI2_HOST)
|
||||
#define TFT_SPI_HOST SPI2_HOST
|
||||
#elif defined (CONFIG_LV_TFT_DISPLAY_SPI3_HOST)
|
||||
#define TFT_SPI_HOST SPI3_HOST
|
||||
#endif
|
||||
|
||||
#if defined (CONFIG_LV_TFT_DISPLAY_SPI_HALF_DUPLEX)
|
||||
|
|
|
@ -469,18 +469,17 @@ menu "LVGL TFT Display controller"
|
|||
|
||||
choice
|
||||
prompt "TFT SPI Bus." if LV_TFT_DISPLAY_PROTOCOL_SPI
|
||||
default LV_TFT_DISPLAY_SPI_VSPI if LV_PREDEFINED_DISPLAY_TTGO && \
|
||||
default LV_TFT_DISPLAY_SPI3_HOST if LV_PREDEFINED_DISPLAY_TTGO && \
|
||||
!IDF_TARGET_ESP32S2
|
||||
default LV_TFT_DISPLAY_SPI_FSPI if IDF_TARGET_ESP32S2
|
||||
help
|
||||
Select the SPI Bus the TFT Display is attached to.
|
||||
|
||||
config LV_TFT_DISPLAY_SPI_HSPI
|
||||
bool "HSPI"
|
||||
config LV_TFT_DISPLAY_SPI_VSPI
|
||||
bool "VSPI" if !IDF_TARGET_ESP32S2
|
||||
config LV_TFT_DISPLAY_SPI_FSPI
|
||||
bool "FSPI" if IDF_TARGET_ESP32S2
|
||||
config LV_TFT_DISPLAY_SPI1_HOST
|
||||
bool "SPI1_HOST"
|
||||
config LV_TFT_DISPLAY_SPI2_HOST
|
||||
bool "SPI2_HOST"
|
||||
config LV_TFT_DISPLAY_SPI3_HOST
|
||||
bool "SPI3_HOST"
|
||||
endchoice
|
||||
|
||||
choice
|
||||
|
|
Loading…
Reference in a new issue