From 9f40d9a17a4c8a71038ec6674593afabe497bc0b Mon Sep 17 00:00:00 2001 From: jgromes Date: Wed, 29 Dec 2021 08:49:30 +0100 Subject: [PATCH] [nRF24] Added ESP8266/ESP32 IRAM attribute --- .../nRF24/nRF24_Receive_Interrupt/nRF24_Receive_Interrupt.ino | 3 +++ .../nRF24_Transmit_Interrupt/nRF24_Transmit_Interrupt.ino | 3 +++ 2 files changed, 6 insertions(+) diff --git a/examples/nRF24/nRF24_Receive_Interrupt/nRF24_Receive_Interrupt.ino b/examples/nRF24/nRF24_Receive_Interrupt/nRF24_Receive_Interrupt.ino index cafa2964..9e73394a 100644 --- a/examples/nRF24/nRF24_Receive_Interrupt/nRF24_Receive_Interrupt.ino +++ b/examples/nRF24/nRF24_Receive_Interrupt/nRF24_Receive_Interrupt.ino @@ -94,6 +94,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/nRF24/nRF24_Transmit_Interrupt/nRF24_Transmit_Interrupt.ino b/examples/nRF24/nRF24_Transmit_Interrupt/nRF24_Transmit_Interrupt.ino index 9b6720c5..14d0c072 100644 --- a/examples/nRF24/nRF24_Transmit_Interrupt/nRF24_Transmit_Interrupt.ino +++ b/examples/nRF24/nRF24_Transmit_Interrupt/nRF24_Transmit_Interrupt.ino @@ -90,6 +90,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) {