diff options
author | Daniel Garcia <dgarcia@dgarcia.net> | 2019-01-20 05:02:23 +0300 |
---|---|---|
committer | Daniel Garcia <dgarcia@dgarcia.net> | 2019-01-20 05:02:23 +0300 |
commit | af74ae7e0a9df50686cdbc132cfabe81e6175fcc (patch) | |
tree | db16c813e20bc3d23cb7af3b538341ea8ff4a33d | |
parent | d50df7116579321d850d956d57d03d4f4ce1ec59 (diff) |
Make sure that everything called from the interrupt handler for ESP32 is marked with IRAM_ATTR property - should fix #676
-rw-r--r-- | platforms/esp/32/clockless_esp32.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/platforms/esp/32/clockless_esp32.h b/platforms/esp/32/clockless_esp32.h index df43ca88..58b3c3bc 100644 --- a/platforms/esp/32/clockless_esp32.h +++ b/platforms/esp/32/clockless_esp32.h @@ -403,7 +403,7 @@ protected: // -- Start up the next controller // This method is static so that it can dispatch to the // appropriate startOnChannel method of the given controller. - static void startNext(int channel) + static void IRAM_ATTR startNext(int channel) { if (gNext < gNumControllers) { ClocklessController * pController = static_cast<ClocklessController*>(gControllers[gNext]); @@ -415,7 +415,7 @@ protected: // -- Start this controller on the given channel // This function just initiates the RMT write; it does not wait // for it to finish. - void startOnChannel(int channel) + void IRAM_ATTR startOnChannel(int channel) { // -- Assign this channel and configure the RMT mRMT_channel = rmt_channel_t(channel); @@ -460,7 +460,7 @@ protected: // handler (below), or as a callback from the built-in // interrupt handler. It is static because we don't know which // controller is done until we look it up. - static void doneOnChannel(rmt_channel_t channel, void * arg) + static void IRAM_ATTR doneOnChannel(rmt_channel_t channel, void * arg) { if (channel >= FASTLED_RMT_MAX_CHANNELS) return; @@ -526,7 +526,7 @@ protected: // buffer with pixel data. It also handles the case where the // pixel data is exhausted, so we need to fill the RMT buffer // with zeros to signal that it's done. - void fillHalfRMTBuffer() + void IRAM_ATTR fillHalfRMTBuffer() { uint32_t one_val = mOne.val; uint32_t zero_val = mZero.val; |