diff --git a/components/FastLED-idf/CMakeLists.txt b/components/FastLED-idf/CMakeLists.txt new file mode 100644 index 0000000..1be0b9d --- /dev/null +++ b/components/FastLED-idf/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.5) + +set(srcs + "FastLED.cpp" + "bitswap.cpp" + "colorpalettes.cpp" + "colorutils.cpp" + "hsv2rgb.cpp" + "lib8tion.cpp" + "noise.cpp" + "platforms.cpp" + "power_mgt.cpp" + "wiring.cpp") +# everything needs the ESP32 flag, not sure why this won't work +# going to hack by adding the ESP32 define in the h file + #`target_compile_options(${COMPONENT_LIB} PRIVATE "-DESP32") + +idf_component_register(SRCS "${srcs}" + INCLUDE_DIRS "." ) diff --git a/components/FastLED-idf/FastLED.h b/components/FastLED-idf/FastLED.h index d7b6375..d05f56a 100644 --- a/components/FastLED-idf/FastLED.h +++ b/components/FastLED-idf/FastLED.h @@ -4,6 +4,9 @@ ///@file FastLED.h /// central include file for FastLED, defines the CFastLED class/object +// BB hack +#define ESP32 + #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) #define FASTLED_HAS_PRAGMA_MESSAGE #endif diff --git a/components/FastLED-idf/Kconfig b/components/FastLED-idf/Kconfig new file mode 100644 index 0000000..a09d8bf --- /dev/null +++ b/components/FastLED-idf/Kconfig @@ -0,0 +1,10 @@ +menu "Fast LED" + + config FAST_LED_TEST + bool "Create a Fast LED option in case I need to later" + default n + help + I don't know if I'm going to have to add menuconfig options in the future. + Maybe I will. If I do, this is the template for doing it. + +endmenu diff --git a/components/FastLED-idf/component.mk b/components/FastLED-idf/component.mk index 27ad11a..caf1e7f 100644 --- a/components/FastLED-idf/component.mk +++ b/components/FastLED-idf/component.mk @@ -1 +1,3 @@ +COMPONENT_SRCDIRS := . COMPONENT_ADD_INCLUDEDIRS := . +COMPONENT_PRIV_INCLUDEDIRS := lib8tion platforms/esp/32 diff --git a/components/FastLED-idf/platforms.h b/components/FastLED-idf/platforms.h index f66599f..411a00f 100644 --- a/components/FastLED-idf/platforms.h +++ b/components/FastLED-idf/platforms.h @@ -1,6 +1,8 @@ #ifndef __INC_PLATFORMS_H #define __INC_PLATFORMS_H +#define ESP32 + #include "FastLED.h" #include "fastled_config.h" diff --git a/sdkconfig b/sdkconfig index a3441aa..9d6848e 100644 --- a/sdkconfig +++ b/sdkconfig @@ -518,6 +518,7 @@ CONFIG_WL_SECTOR_SIZE_4096=y CONFIG_WL_SECTOR_SIZE=4096 CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=64 CONFIG_WPA_MBEDTLS_CRYPTO=y +# CONFIG_FAST_LED_TEST is not set # CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set # Deprecated options for backward compatibility