From d35c302dd6e44f1484b8abba352dd82a6929ae1e Mon Sep 17 00:00:00 2001 From: lovyan03 <42724151+lovyan03@users.noreply.github.com> Date: Mon, 26 Feb 2024 14:53:25 +0900 Subject: [PATCH] tweak for IDF 5.2 --- src/lgfx/v1/platforms/esp32/common.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lgfx/v1/platforms/esp32/common.cpp b/src/lgfx/v1/platforms/esp32/common.cpp index df3dd20d..3bb124af 100644 --- a/src/lgfx/v1/platforms/esp32/common.cpp +++ b/src/lgfx/v1/platforms/esp32/common.cpp @@ -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), &buscfg, dma_channel)) { @@ -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