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:
authorh3ndrik <hendrik+dev@xd0.de>2018-09-01 02:03:28 +0300
committerDaniel Garcia <danielgarcia@gmail.com>2018-09-01 02:03:28 +0300
commit13c3ed586bee184bfcc8bdec8d109376f8940128 (patch)
tree84b78744ff8a485ca0ab85e7f39c3291a038abf8 /platforms
parent473d6af7225e497d1b54f39d400189e396e98d4f (diff)
only handle own rmt interrupts (#647)
Exit early if the interrupt is for another channel which is used by something else than FastLED. This is needed if we use FASTLED_RMT_BUILTIN_DRIVER and lower FASTLED_RMT_MAX_CHANNELS in order to free some rmt channels for something else. In this case doneOnChannel() is called for all rmt channels even if they don't belong to FastLED. So exit early in this case before the esp32 notices and reboots on its own.
Diffstat (limited to 'platforms')
-rw-r--r--platforms/esp/32/clockless_esp32.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/platforms/esp/32/clockless_esp32.h b/platforms/esp/32/clockless_esp32.h
index 248325ad..c66eb0ce 100644
--- a/platforms/esp/32/clockless_esp32.h
+++ b/platforms/esp/32/clockless_esp32.h
@@ -462,6 +462,8 @@ protected:
// controller is done until we look it up.
static void doneOnChannel(rmt_channel_t channel, void * arg)
{
+ if (channel >= FASTLED_RMT_MAX_CHANNELS) return;
+
ClocklessController * controller = static_cast<ClocklessController*>(gOnChannel[channel]);
portBASE_TYPE HPTaskAwoken = 0;