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
|
#define ENABLE_TOUCH_INPUT CONFIG_LV_ENABLE_TOUCH
|
||||||
|
|
||||||
#if defined (CONFIG_LV_TFT_DISPLAY_SPI_HSPI)
|
#if defined (CONFIG_LV_TFT_DISPLAY_SPI1_HOST)
|
||||||
#if defined (CONFIG_IDF_TARGET_ESP32C3)
|
#define TFT_SPI_HOST SPI1_HOST
|
||||||
|
#elif defined (CONFIG_LV_TFT_DISPLAY_SPI2_HOST)
|
||||||
#define TFT_SPI_HOST SPI2_HOST
|
#define TFT_SPI_HOST SPI2_HOST
|
||||||
#else
|
#elif defined (CONFIG_LV_TFT_DISPLAY_SPI3_HOST)
|
||||||
#define TFT_SPI_HOST HSPI_HOST
|
#define TFT_SPI_HOST SPI3_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
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (CONFIG_LV_TFT_DISPLAY_SPI_HALF_DUPLEX)
|
#if defined (CONFIG_LV_TFT_DISPLAY_SPI_HALF_DUPLEX)
|
||||||
|
|
|
@ -469,18 +469,17 @@ menu "LVGL TFT Display controller"
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "TFT SPI Bus." if LV_TFT_DISPLAY_PROTOCOL_SPI
|
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
|
!IDF_TARGET_ESP32S2
|
||||||
default LV_TFT_DISPLAY_SPI_FSPI if IDF_TARGET_ESP32S2
|
|
||||||
help
|
help
|
||||||
Select the SPI Bus the TFT Display is attached to.
|
Select the SPI Bus the TFT Display is attached to.
|
||||||
|
|
||||||
config LV_TFT_DISPLAY_SPI_HSPI
|
config LV_TFT_DISPLAY_SPI1_HOST
|
||||||
bool "HSPI"
|
bool "SPI1_HOST"
|
||||||
config LV_TFT_DISPLAY_SPI_VSPI
|
config LV_TFT_DISPLAY_SPI2_HOST
|
||||||
bool "VSPI" if !IDF_TARGET_ESP32S2
|
bool "SPI2_HOST"
|
||||||
config LV_TFT_DISPLAY_SPI_FSPI
|
config LV_TFT_DISPLAY_SPI3_HOST
|
||||||
bool "FSPI" if IDF_TARGET_ESP32S2
|
bool "SPI3_HOST"
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
choice
|
choice
|
||||||
|
|
Loading…
Reference in a new issue