diff options
-rw-r--r-- | src/lib8tion.h | 10 | ||||
-rw-r--r-- | src/platforms/esp/32/led_sysdefs_esp32.h | 10 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/lib8tion.h b/src/lib8tion.h index 0cc3baa4..80e27100 100644 --- a/src/lib8tion.h +++ b/src/lib8tion.h @@ -834,10 +834,7 @@ public: uint16_t operator*(uint16_t v) { return (v*i) + ((v*f)>>F); } int32_t operator*(int32_t v) { return (v*i) + ((v*f)>>F); } int16_t operator*(int16_t v) { return (v*i) + ((v*f)>>F); } -#ifdef FASTLED_ARM - int operator*(int v) { return (v*i) + ((v*f)>>F); } -#endif -#ifdef FASTLED_APOLLO3 +#if defined(FASTLED_ARM) | defined(FASTLED_RISCV) | defined(FASTLED_APOLLO3) int operator*(int v) { return (v*i) + ((v*f)>>F); } #endif }; @@ -846,10 +843,7 @@ template<class T, int F, int I> static uint32_t operator*(uint32_t v, q<T,F,I> & template<class T, int F, int I> static uint16_t operator*(uint16_t v, q<T,F,I> & q) { return q * v; } template<class T, int F, int I> static int32_t operator*(int32_t v, q<T,F,I> & q) { return q * v; } template<class T, int F, int I> static int16_t operator*(int16_t v, q<T,F,I> & q) { return q * v; } -#ifdef FASTLED_ARM -template<class T, int F, int I> static int operator*(int v, q<T,F,I> & q) { return q * v; } -#endif -#ifdef FASTLED_APOLLO3 +#if defined(FASTLED_ARM) | defined(FASTLED_RISCV) | defined(FASTLED_APOLLO3) template<class T, int F, int I> static int operator*(int v, q<T,F,I> & q) { return q * v; } #endif diff --git a/src/platforms/esp/32/led_sysdefs_esp32.h b/src/platforms/esp/32/led_sysdefs_esp32.h index 73df21bb..f93f528b 100644 --- a/src/platforms/esp/32/led_sysdefs_esp32.h +++ b/src/platforms/esp/32/led_sysdefs_esp32.h @@ -1,11 +1,19 @@ #pragma once - +#include "esp32-hal.h" #ifndef ESP32 #define ESP32 #endif #define FASTLED_ESP32 +#if CONFIG_IDF_TARGET_ARCH_RISCV +#define FASTLED_RISCV +#endif + +#if CONFIG_IDF_TARGET_ARCH_XTENSA || CONFIG_XTENSA_IMPL +#define FASTLED_XTENSA +#endif + // Use system millis timer #define FASTLED_HAS_MILLIS |