From 13c3ed586bee184bfcc8bdec8d109376f8940128 Mon Sep 17 00:00:00 2001 From: h3ndrik Date: Sat, 1 Sep 2018 01:03:28 +0200 Subject: 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. --- platforms/esp/32/clockless_esp32.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'platforms') 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(gOnChannel[channel]); portBASE_TYPE HPTaskAwoken = 0; -- cgit v1.2.3