Skip to content

Commit d1fc700

Browse files
committed
Move timer detachInterrupt functions into IRAM (esp8266#2083)
These functions are used from ISR in Servo library, so must be in IRAM.
1 parent ef80030 commit d1fc700

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cores/esp8266/core_esp8266_timer.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void timer1_attachInterrupt(timercallback userFunc) {
5050
ETS_FRC1_INTR_ENABLE();
5151
}
5252

53-
void timer1_detachInterrupt() {
53+
void ICACHE_RAM_ATTR timer1_detachInterrupt() {
5454
timer1_user_cb = 0;
5555
TEIE &= ~TEIE1;//edge int disable
5656
ETS_FRC1_INTR_DISABLE();
@@ -95,7 +95,7 @@ void timer0_attachInterrupt(timercallback userFunc) {
9595
ETS_CCOMPARE0_ENABLE();
9696
}
9797

98-
void timer0_detachInterrupt() {
98+
void ICACHE_RAM_ATTR timer0_detachInterrupt() {
9999
timer0_user_cb = NULL;
100100
ETS_CCOMPARE0_DISABLE();
101101
}

0 commit comments

Comments
 (0)