From 77a7643dee44e6a69744e96506a21014e0b1bf4f Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Sat, 8 Jun 2019 10:25:50 +0100 Subject: [PATCH] Add ISR_PREFIX for ESP8266 and ESP32 --- src/LoRa.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/LoRa.cpp b/src/LoRa.cpp index 78eb172..5dc9faa 100644 --- a/src/LoRa.cpp +++ b/src/LoRa.cpp @@ -53,6 +53,12 @@ #define MAX_PKT_LENGTH 255 +#ifdef ESP8266 || ESP32 + #define ISR_PREFIX ICACHE_RAM_ATTR +#else + #define ISR_PREFIX +#endif + LoRaClass::LoRaClass() : _spiSettings(8E6, MSBFIRST, SPI_MODE0), _ss(LORA_DEFAULT_SS_PIN), _reset(LORA_DEFAULT_RESET_PIN), _dio0(LORA_DEFAULT_DIO0_PIN), @@ -565,7 +571,7 @@ uint8_t LoRaClass::singleTransfer(uint8_t address, uint8_t value) return response; } -void LoRaClass::onDio0Rise() +ISR_PREFIX void LoRaClass::onDio0Rise() { LoRa.handleDio0Rise(); }