Skip to content

Commit

Permalink
tweak for IDF 5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
lovyan03 committed Feb 26, 2024
1 parent 59479b3 commit d35c302
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/lgfx/v1/platforms/esp32/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,13 +486,11 @@ namespace lgfx
buscfg.flags = SPICOMMON_BUSFLAG_MASTER;
buscfg.intr_flags = 0;
#if defined (ESP_IDF_VERSION_VAL)
#if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 0))
#if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 0))
buscfg.isr_cpu_id = ESP_INTR_CPU_AFFINITY_AUTO;
#else
#if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 1, 0))
#elif (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 1, 0))
buscfg.isr_cpu_id = INTR_CPU_ID_AUTO;
#endif
#endif
#endif
if (ESP_OK != spi_bus_initialize(static_cast<spi_host_device_t>(spi_host), &buscfg, dma_channel))
{
Expand Down Expand Up @@ -830,7 +828,7 @@ namespace lgfx
}
#if defined (CONFIG_IDF_TARGET_ESP32S3)
#if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 3) && ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 1, 0)) \
|| (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 1, 1) && ESP_IDF_VERSION <= ESP_IDF_VERSION_VAL(5, 2, 0)) \
|| (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 1, 1) && ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 2, 0)) \
|| (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0))
(&dev->comd[0])[index].val = cmd_val;
#else
Expand Down

0 comments on commit d35c302

Please sign in to comment.