From d715d58c2da7abefbfa6f17a5849484f8e88e971 Mon Sep 17 00:00:00 2001 From: lovyan03 <42724151+lovyan03@users.noreply.github.com> Date: Wed, 6 Nov 2024 19:50:53 +0900 Subject: [PATCH] fix compile error --- src/lgfx/v1/platforms/esp32/Bus_SPI.cpp | 2 +- src/lgfx/v1/platforms/esp32/common.cpp | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/lgfx/v1/platforms/esp32/Bus_SPI.cpp b/src/lgfx/v1/platforms/esp32/Bus_SPI.cpp index 5ee139e2..a0912b19 100644 --- a/src/lgfx/v1/platforms/esp32/Bus_SPI.cpp +++ b/src/lgfx/v1/platforms/esp32/Bus_SPI.cpp @@ -59,7 +59,7 @@ Original Source: #endif #ifndef SPI_PIN_REG - #define SPI_PIN_REG SPI_MISC_REG + #define SPI_PIN_REG(i) SPI_MISC_REG(i) #endif #if defined (SOC_GDMA_SUPPORTED) // for C3/C6/S3 diff --git a/src/lgfx/v1/platforms/esp32/common.cpp b/src/lgfx/v1/platforms/esp32/common.cpp index 7af6065c..db705a77 100644 --- a/src/lgfx/v1/platforms/esp32/common.cpp +++ b/src/lgfx/v1/platforms/esp32/common.cpp @@ -35,13 +35,16 @@ Original Source: #include #include #include - -#if __has_include() - #include -#elif __has_include () - #include +#if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0)) + //#include + #if __has_include() + #include + #endif +#else + #if __has_include () + #include + #endif #endif - #include #include