backward compatibility with esp-idf release/v4.2 (<4.3)
This commit is contained in:
parent
66cee1b191
commit
a76c88fd66
|
@ -182,7 +182,11 @@ bool lvgl_spi_driver_init(int host,
|
||||||
#if defined (CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)
|
#if defined (CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)
|
||||||
dma_channel = SPI_DMA_CH_AUTO;
|
dma_channel = SPI_DMA_CH_AUTO;
|
||||||
#endif
|
#endif
|
||||||
|
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(4,3,0)
|
||||||
|
esp_err_t ret = spi_bus_initialize(host, &buscfg, dma_channel);
|
||||||
|
#else
|
||||||
esp_err_t ret = spi_bus_initialize(host, &buscfg, (spi_dma_chan_t)dma_channel);
|
esp_err_t ret = spi_bus_initialize(host, &buscfg, (spi_dma_chan_t)dma_channel);
|
||||||
|
#endif
|
||||||
assert(ret == ESP_OK);
|
assert(ret == ESP_OK);
|
||||||
|
|
||||||
return ESP_OK != ret;
|
return ESP_OK != ret;
|
||||||
|
|
Loading…
Reference in a new issue