Skip to content

Commit d7ce2ca

Browse files
authored
Fix a bug where we never detached the timer interrupt on ESP32s. (#1984)
Kudos to @homy-newfs8 for finding, isolating, and providing a fix for the bug. Note: `timerEnd()` needs to happen after `timerDetachInterrupt()` Fixes #1983
1 parent 575a81b commit d7ce2ca

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/IRrecv.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ void IRrecv::disableIRIn(void) {
399399
#endif // ESP8266
400400
#if defined(ESP32)
401401
timerAlarmDisable(timer);
402+
timerDetachInterrupt(timer);
402403
timerEnd(timer);
403404
#endif // ESP32
404405
detachInterrupt(params.recvpin);

0 commit comments

Comments
 (0)