diff options
author | h3ndrik <hendrik+dev@xd0.de> | 2018-09-01 02:03:28 +0300 |
---|---|---|
committer | Daniel Garcia <danielgarcia@gmail.com> | 2018-09-01 02:03:28 +0300 |
commit | 13c3ed586bee184bfcc8bdec8d109376f8940128 (patch) | |
tree | 84b78744ff8a485ca0ab85e7f39c3291a038abf8 | |
parent | 473d6af7225e497d1b54f39d400189e396e98d4f (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.
-rw-r--r-- | platforms/esp/32/clockless_esp32.h | 2 |
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; |