From fa4a4de87980ee5fb26fb4ad4403f98f85494aef Mon Sep 17 00:00:00 2001 From: jgromes Date: Wed, 29 Dec 2021 08:49:22 +0100 Subject: [PATCH] [SX128x] Added ESP8266/ESP32 IRAM attribute --- .../SX128x_Receive_Interrupt/SX128x_Receive_Interrupt.ino | 3 +++ .../SX128x_Transmit_Interrupt/SX128x_Transmit_Interrupt.ino | 3 +++ 2 files changed, 6 insertions(+) diff --git a/examples/SX128x/SX128x_Receive_Interrupt/SX128x_Receive_Interrupt.ino b/examples/SX128x/SX128x_Receive_Interrupt/SX128x_Receive_Interrupt.ino index 9bc9eaaa..274121df 100644 --- a/examples/SX128x/SX128x_Receive_Interrupt/SX128x_Receive_Interrupt.ino +++ b/examples/SX128x/SX128x_Receive_Interrupt/SX128x_Receive_Interrupt.ino @@ -85,6 +85,9 @@ volatile bool enableInterrupt = true; // is received by the module // IMPORTANT: this function MUST be 'void' type // and MUST NOT have any arguments! +#if defined(ESP8266) || defined(ESP32) + ICACHE_RAM_ATTR +#endif void setFlag(void) { // check if the interrupt is enabled if(!enableInterrupt) { diff --git a/examples/SX128x/SX128x_Transmit_Interrupt/SX128x_Transmit_Interrupt.ino b/examples/SX128x/SX128x_Transmit_Interrupt/SX128x_Transmit_Interrupt.ino index b23fb0c1..55d44faa 100644 --- a/examples/SX128x/SX128x_Transmit_Interrupt/SX128x_Transmit_Interrupt.ino +++ b/examples/SX128x/SX128x_Transmit_Interrupt/SX128x_Transmit_Interrupt.ino @@ -77,6 +77,9 @@ volatile bool enableInterrupt = true; // is transmitted by the module // IMPORTANT: this function MUST be 'void' type // and MUST NOT have any arguments! +#if defined(ESP8266) || defined(ESP32) + ICACHE_RAM_ATTR +#endif void setFlag(void) { // check if the interrupt is enabled if(!enableInterrupt) {