Skip to content

Commit 60db0d3

Browse files
authored
Fix addApbChangeCallback(): duplicate func kernel msgs (#1435)
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
1 parent c818091 commit 60db0d3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/IRrecv.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ void IRrecv::disableIRIn(void) {
360360
#endif // ESP8266
361361
#if defined(ESP32)
362362
timerAlarmDisable(timer);
363+
timerEnd(timer);
363364
#endif // ESP32
364365
detachInterrupt(params.recvpin);
365366
#endif // UNIT_TEST

0 commit comments

Comments
 (0)