Skip to content

Commit 1af2997

Browse files
committed
Add support for ESP32C3 SPI hosts
1 parent 8b65d35 commit 1af2997

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lvgl_helpers.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,13 @@ bool lvgl_spi_driver_init(int host,
227227
const char *spi_names[] = {
228228
"SPI_HOST", "", ""
229229
};
230+
#elif defined (CONFIG_IDF_TARGET_ESP32C3)
231+
assert((SPI1_HOST <= host) && (SPI3_HOST >= host));
232+
const char *spi_names[] = {
233+
"SPI1_HOST", "SPI2_HOST", "SPI3_HOST"
234+
};
235+
#else
236+
#error "Target chip not selected"
230237
#endif
231238

232239
ESP_LOGI(TAG, "Configuring SPI host %s (%d)", spi_names[host], host);

0 commit comments

Comments
 (0)