Skip to content

Commit 6b0a117

Browse files
committed
Move attachInterrupt and detachInterrupt into IRAM (#1734)
1 parent 8d43c40 commit 6b0a117

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cores/esp8266/core_esp8266_wiring_digital.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ void ICACHE_RAM_ATTR interrupt_handler(void *arg) {
134134
ETS_GPIO_INTR_ENABLE();
135135
}
136136

137-
extern void __attachInterrupt(uint8_t pin, voidFuncPtr userFunc, int mode) {
137+
extern void ICACHE_RAM_ATTR __attachInterrupt(uint8_t pin, voidFuncPtr userFunc, int mode) {
138138
if(pin < 16) {
139139
interrupt_handler_t *handler = &interrupt_handlers[pin];
140140
handler->mode = mode;
@@ -146,7 +146,7 @@ extern void __attachInterrupt(uint8_t pin, voidFuncPtr userFunc, int mode) {
146146
}
147147
}
148148

149-
extern void __detachInterrupt(uint8_t pin) {
149+
extern void ICACHE_RAM_ATTR __detachInterrupt(uint8_t pin) {
150150
if(pin < 16) {
151151
GPC(pin) &= ~(0xF << GPCI);//INT mode disabled
152152
GPIEC = (1 << pin); //Clear Interrupt for this pin

0 commit comments

Comments
 (0)