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