Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FastLED/FastLED.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Tranchida <jtranchida@gmail.com>2021-12-16 10:52:48 +0300
committerJason Tranchida <jtranchida@gmail.com>2021-12-16 10:52:48 +0300
commit25955e1264eec2fec804d7786e2f640bf9e0d189 (patch)
tree1cfc86d9b96aef7fdee98622c5766f3667990493
parent1d236ab05a6bb241a3b9e02ed433f25517c725bb (diff)
Improve compatibility with older ESP32 Arduino core versions
-rw-r--r--src/platforms/esp/32/led_sysdefs_esp32.h11
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