Skip to content

Commit

Permalink
Fix addApbChangeCallback(): duplicate func kernel msgs (#1435)
Browse files Browse the repository at this point in the history
When `IRrecv::enableIRn()` was called after a `IRrecv::disableIRn()` call the ESP32 would produce a kernel message/warning on the serial port. e.g.:
```
[E][esp32-hal-cpu.c:93] addApbChangeCallback(): duplicate func=400814C4 arg=3FFBDFC4
```
if the ESP32 IDF 3.3 (v1.0.5) was used.

Fix the issue by ensuring a `timerEnd()` call is made in the `disableIRIn()` call to properly clean up the timer.

Tested on an ESP32dev board. Confirmed the message no longer appears.

Fixes #1434
  • Loading branch information
crankyoldgit authored Mar 21, 2021
1 parent c818091 commit 60db0d3
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 @@ -360,6 +360,7 @@ void IRrecv::disableIRIn(void) {
#endif // ESP8266
#if defined(ESP32)
timerAlarmDisable(timer);
timerEnd(timer);
#endif // ESP32
detachInterrupt(params.recvpin);
#endif // UNIT_TEST
Expand Down

0 comments on commit 60db0d3

Please sign in to comment.