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
This commit is contained in:
Hugo Visser 2019-08-18 12:04:36 +02:00
parent 8ffd76069e
commit b21ffda1b6
1 changed files with 4 additions and 0 deletions

View File

@ -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;