From 25955e1264eec2fec804d7786e2f640bf9e0d189 Mon Sep 17 00:00:00 2001 From: Jason Tranchida Date: Wed, 15 Dec 2021 23:52:48 -0800 Subject: Improve compatibility with older ESP32 Arduino core versions --- src/platforms/esp/32/led_sysdefs_esp32.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/platforms/esp/32/led_sysdefs_esp32.h b/src/platforms/esp/32/led_sysdefs_esp32.h index f93f528b..cf1aa4dc 100644 --- a/src/platforms/esp/32/led_sysdefs_esp32.h +++ b/src/platforms/esp/32/led_sysdefs_esp32.h @@ -8,10 +8,17 @@ #if CONFIG_IDF_TARGET_ARCH_RISCV #define FASTLED_RISCV +#else +#define FASTLED_XTENSA #endif -#if CONFIG_IDF_TARGET_ARCH_XTENSA || CONFIG_XTENSA_IMPL -#define FASTLED_XTENSA +// Handling for older versions of ESP32 Arduino core +#if !defined(ESP_IDF_VERSION) +// Older versions of ESP_IDF only supported ESP32 +#define CONFIG_IDF_TARGET_ESP32 1 +// Define missing version macros. Hard code older version 3.0 since actual version is unknown +#define ESP_IDF_VERSION_VAL(major, minor, patch) ((major << 16) | (minor << 8) | (patch)) +#define ESP_IDF_VERSION ESP_IDF_VERSION_VAL(3, 0, 0) #endif // Use system millis timer -- cgit v1.2.3