From 56608eccf7e95b5d95ea0af9cc4a82d67274a24c Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Mon, 18 Feb 2019 23:25:08 +0100 Subject: [PATCH 1/2] Place FunctionalInterrupt into IRAM --- cores/esp8266/FunctionalInterrupt.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cores/esp8266/FunctionalInterrupt.cpp b/cores/esp8266/FunctionalInterrupt.cpp index 2b16fb899f..40e3b5aaaf 100644 --- a/cores/esp8266/FunctionalInterrupt.cpp +++ b/cores/esp8266/FunctionalInterrupt.cpp @@ -11,7 +11,7 @@ typedef void (*voidFuncPtrArg)(void*); extern "C" void ICACHE_RAM_ATTR __attachInterruptArg(uint8_t pin, voidFuncPtr userFunc, void*fp , int mode); -void interruptFunctional(void* arg) +void ICACHE_RAM_ATTR interruptFunctional(void* arg) { ArgStructure* localArg = (ArgStructure*)arg; if (localArg->functionInfo->reqScheduledFunction) @@ -36,7 +36,7 @@ extern "C" } } -void attachInterrupt(uint8_t pin, std::function intRoutine, int mode) +void ICACHE_RAM_ATTR attachInterrupt(uint8_t pin, std::function intRoutine, int mode) { // use the local interrupt routine which takes the ArgStructure as argument @@ -52,7 +52,7 @@ void attachInterrupt(uint8_t pin, std::function intRoutine, int mode __attachInterruptArg (pin, (voidFuncPtr)interruptFunctional, as, mode); } -void attachScheduledInterrupt(uint8_t pin, std::function scheduledIntRoutine, int mode) +void ICACHE_RAM_ATTR attachScheduledInterrupt(uint8_t pin, std::function scheduledIntRoutine, int mode) { if (!scheduledInterrupts) { From f0b472c3be448e8ec72e2b4b7d6b4b040c980560 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Tue, 19 Feb 2019 13:26:36 +0100 Subject: [PATCH 2/2] Update FunctionalInterrupt.cpp --- cores/esp8266/FunctionalInterrupt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/esp8266/FunctionalInterrupt.cpp b/cores/esp8266/FunctionalInterrupt.cpp index 40e3b5aaaf..241db6febd 100644 --- a/cores/esp8266/FunctionalInterrupt.cpp +++ b/cores/esp8266/FunctionalInterrupt.cpp @@ -27,7 +27,7 @@ void ICACHE_RAM_ATTR interruptFunctional(void* arg) extern "C" { - void cleanupFunctional(void* arg) + void ICACHE_RAM_ATTR cleanupFunctional(void* arg) { ArgStructure* localArg = (ArgStructure*)arg; delete (FunctionInfo*)localArg->functionInfo;