From 45d28a4c395dd364554c966b46c9a16ac6efc7f4 Mon Sep 17 00:00:00 2001 From: "J.R. Luppold" Date: Fri, 30 Jul 2021 11:23:44 -0700 Subject: [PATCH 1/4] this CmakeLists.txt inteferes with using as a component --- CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 5d99b96..0000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -# The following lines of boilerplate have to be in your project's -# CMakeLists in this exact order for cmake to work correctly -cmake_minimum_required(VERSION 3.5) - -include($ENV{IDF_PATH}/tools/cmake/project.cmake) -project(FastLED-idf) From d36effcc490a025f29eb46d20757921a079b8083 Mon Sep 17 00:00:00 2001 From: "J.R. Luppold" Date: Fri, 30 Jul 2021 13:51:52 -0700 Subject: [PATCH 2/4] Use RMT not I2S to drive neopixels --- components/FastLED-idf/CMakeLists.txt | 2 +- components/FastLED-idf/FastLED.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/FastLED-idf/CMakeLists.txt b/components/FastLED-idf/CMakeLists.txt index 210e63c..8788f57 100644 --- a/components/FastLED-idf/CMakeLists.txt +++ b/components/FastLED-idf/CMakeLists.txt @@ -14,7 +14,7 @@ set(srcs "hal/esp32-hal-misc.c" "hal/esp32-hal-gpio.c" # remove the following if you want I2S instead of RMT hardware, just put a pound in front -# "platforms/esp/32/clockless_rmt_esp32.cpp" + "platforms/esp/32/clockless_rmt_esp32.cpp" ) # everything needs the ESP32 flag, not sure why this won't work diff --git a/components/FastLED-idf/FastLED.h b/components/FastLED-idf/FastLED.h index a9a8e22..7d2786b 100644 --- a/components/FastLED-idf/FastLED.h +++ b/components/FastLED-idf/FastLED.h @@ -10,7 +10,7 @@ // prefer I2S? Comment this in. // Not the default because haven't tried it as much, does work -#define FASTLED_ESP32_I2S +//#define FASTLED_ESP32_I2S #include "esp32-hal.h" From c65386ec0f51fcc24132e756d4393d087708d704 Mon Sep 17 00:00:00 2001 From: "J.R. Luppold" Date: Wed, 3 Nov 2021 18:07:23 -0700 Subject: [PATCH 3/4] do not include functions already defined in mw --- components/FastLED-idf/hal/esp32-hal-misc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/FastLED-idf/hal/esp32-hal-misc.c b/components/FastLED-idf/hal/esp32-hal-misc.c index 56a98a7..eea9665 100644 --- a/components/FastLED-idf/hal/esp32-hal-misc.c +++ b/components/FastLED-idf/hal/esp32-hal-misc.c @@ -40,6 +40,8 @@ //Source: https://github.com/pcbreflux/espressif/blob/master/esp32/arduino/sketchbook/ESP32_int_temp_sensor/ESP32_int_temp_sensor.ino uint8_t temprature_sens_read(); +#define DEFINED_IN_MPID_ESP32 +#ifndef DEFINED_IN_MPID_ESP32 float temperatureRead() { return (temprature_sens_read() - 32) / 1.8; @@ -51,6 +53,7 @@ void __yield() } void yield() __attribute__ ((weak, alias("__yield"))); +#endif #if 0 @@ -136,6 +139,7 @@ BaseType_t xTaskCreateUniversal( TaskFunction_t pxTaskCode, #endif // test, don't think these are needed +#ifndef DEFINED_IN_MPID_ESP32 unsigned long IRAM_ATTR micros() { return (unsigned long) (esp_timer_get_time()); @@ -160,5 +164,5 @@ void IRAM_ATTR delayMicroseconds(uint32_t us) } while ((esp_timer_get_time() - now) < us); } } - +#endif From ebe44f6d492163f3526bc55634d54fd30e004f25 Mon Sep 17 00:00:00 2001 From: Robert Alfaro Date: Wed, 13 Jul 2022 16:30:26 -0700 Subject: [PATCH 4/4] undef DEFINED_IN_MPID_ESP32 so fastled can call millis() --- components/FastLED-idf/hal/esp32-hal-misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/FastLED-idf/hal/esp32-hal-misc.c b/components/FastLED-idf/hal/esp32-hal-misc.c index eea9665..a9f40fa 100644 --- a/components/FastLED-idf/hal/esp32-hal-misc.c +++ b/components/FastLED-idf/hal/esp32-hal-misc.c @@ -40,7 +40,7 @@ //Source: https://github.com/pcbreflux/espressif/blob/master/esp32/arduino/sketchbook/ESP32_int_temp_sensor/ESP32_int_temp_sensor.ino uint8_t temprature_sens_read(); -#define DEFINED_IN_MPID_ESP32 +//#define DEFINED_IN_MPID_ESP32 #ifndef DEFINED_IN_MPID_ESP32 float temperatureRead() {