From b21ffda1b618da7d2e052d9d774703613de7013a Mon Sep 17 00:00:00 2001 From: Hugo Visser Date: Sun, 18 Aug 2019 12:04:36 +0200 Subject: [PATCH] Handle interrupt correctly on ESP8266 For ESP8266 the interrupt handler must be in IRAM. Newer Arduino versions will now crash if this not the case. See https://forum.arduino.cc/index.php?topic=616264.msg4182494#msg4182494 --- RFControl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RFControl.cpp b/RFControl.cpp index 2bb46e4..0e3f1ea 100644 --- a/RFControl.cpp +++ b/RFControl.cpp @@ -33,7 +33,11 @@ bool data1_ready = false; bool data2_ready = false; bool skip = false; bool new_duration = false; +#ifdef ICACHE_RAM_ATTR +void ICACHE_RAM_ATTR handleInterrupt(); +#else void handleInterrupt(); +#endif unsigned int RFControl::getPulseLengthDivider() { return PULSE_LENGTH_DIVIDER;