From d1fc7002c1e1a27b3685be22c1c7fc0af9060817 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Fri, 3 Jun 2016 15:09:03 +0800 Subject: [PATCH] Move timer detachInterrupt functions into IRAM (#2083) These functions are used from ISR in Servo library, so must be in IRAM. --- cores/esp8266/core_esp8266_timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cores/esp8266/core_esp8266_timer.c b/cores/esp8266/core_esp8266_timer.c index cd4341239..eb9f5ffff 100644 --- a/cores/esp8266/core_esp8266_timer.c +++ b/cores/esp8266/core_esp8266_timer.c @@ -50,7 +50,7 @@ void timer1_attachInterrupt(timercallback userFunc) { ETS_FRC1_INTR_ENABLE(); } -void timer1_detachInterrupt() { +void ICACHE_RAM_ATTR timer1_detachInterrupt() { timer1_user_cb = 0; TEIE &= ~TEIE1;//edge int disable ETS_FRC1_INTR_DISABLE(); @@ -95,7 +95,7 @@ void timer0_attachInterrupt(timercallback userFunc) { ETS_CCOMPARE0_ENABLE(); } -void timer0_detachInterrupt() { +void ICACHE_RAM_ATTR timer0_detachInterrupt() { timer0_user_cb = NULL; ETS_CCOMPARE0_DISABLE(); }