Handle ESP32C3 when using ESP32C3

This commit is contained in:
C47D 2021-06-10 22:36:01 -05:00
parent d09fd59869
commit d379a4e851

View file

@ -65,11 +65,15 @@ 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_SPI_HSPI)
#define TFT_SPI_HOST HSPI_HOST #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) #elif defined (CONFIG_LV_TFT_DISPLAY_SPI_VSPI)
#define TFT_SPI_HOST VSPI_HOST #define TFT_SPI_HOST VSPI_HOST
#elif defined (CONFIG_LV_TFT_DISPLAY_SPI_FSPI) #elif defined (CONFIG_LV_TFT_DISPLAY_SPI_FSPI)
#define TFT_SPI_HOST FSPI_HOST #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)