Add support for ESP32C3 SPI hosts

This commit is contained in:
C47D 2021-06-08 10:26:03 -05:00
parent 8b65d3547c
commit 1af29975e9

View file

@ -227,6 +227,13 @@ bool lvgl_spi_driver_init(int host,
const char *spi_names[] = { const char *spi_names[] = {
"SPI_HOST", "", "" "SPI_HOST", "", ""
}; };
#elif defined (CONFIG_IDF_TARGET_ESP32C3)
assert((SPI1_HOST <= host) && (SPI3_HOST >= host));
const char *spi_names[] = {
"SPI1_HOST", "SPI2_HOST", "SPI3_HOST"
};
#else
#error "Target chip not selected"
#endif #endif
ESP_LOGI(TAG, "Configuring SPI host %s (%d)", spi_names[host], host); ESP_LOGI(TAG, "Configuring SPI host %s (%d)", spi_names[host], host);