diff options
author | Sam Guyer <sam.guyer@gmail.com> | 2022-01-02 19:22:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-02 19:22:38 +0300 |
commit | 6e4a51695b69bf6b562d6a0525deb65a25ebc881 (patch) | |
tree | 6f0cab92a24e6422d42211d6a4852657ea64d892 | |
parent | e47bbab67358d6d1dab8e25331206ef881646f7e (diff) | |
parent | 25955e1264eec2fec804d7786e2f640bf9e0d189 (diff) |
Merge pull request #1333 from maddogjt/esp32_core_compat
Improve compatibility with older ESP32 Arduino core versions
-rw-r--r-- | src/platforms/esp/32/led_sysdefs_esp32.h | 11 |
1 files 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 |