Skip to content

Commit

Permalink
Fix a bug where we never detached the timer interrupt on ESP32s. (#1984)
Browse files Browse the repository at this point in the history
Kudos to @homy-newfs8 for finding, isolating, and providing a fix for the bug.
Note: `timerEnd()` needs to happen after `timerDetachInterrupt()`

Fixes #1983
  • Loading branch information
crankyoldgit committed May 4, 2023
1 parent 575a81b commit d7ce2ca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/IRrecv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ void IRrecv::disableIRIn(void) {
#endif // ESP8266
#if defined(ESP32)
timerAlarmDisable(timer);
timerDetachInterrupt(timer);
timerEnd(timer);
#endif // ESP32
detachInterrupt(params.recvpin);
Expand Down

0 comments on commit d7ce2ca

Please sign in to comment.