Add ISR_PREFIX for ESP

See Issue #124
This commit is contained in:
Felix Rusu 2019-07-25 10:41:14 -04:00
parent 567560d696
commit 6ddfb2ff7d
2 changed files with 7 additions and 1 deletions

View File

@ -371,7 +371,7 @@ void RFM69::interruptHandler() {
} }
// internal function // internal function
void RFM69::isr0() { _haveData = true; } ISR_PREFIX void RFM69::isr0() { _haveData = true; }
// internal function // internal function
void RFM69::receiveBegin() { void RFM69::receiveBegin() {

View File

@ -68,6 +68,12 @@
#endif #endif
#endif #endif
#if defined(ESP8266) || defined(ESP32)
#define ISR_PREFIX ICACHE_RAM_ATTR
#else
#define ISR_PREFIX
#endif
// digitalPinToInterrupt is not available prior to Arduino 1.5.6 and 1.0.6 // digitalPinToInterrupt is not available prior to Arduino 1.5.6 and 1.0.6
// See http://arduino.cc/en/Reference/attachInterrupt // See http://arduino.cc/en/Reference/attachInterrupt
#ifndef NOT_AN_INTERRUPT #ifndef NOT_AN_INTERRUPT