Skip to content

Commit 1b56da6

Browse files
committed
Rename ESP32 timer name so that it doesn't conflict with other timers.
1 parent aa8f7b3 commit 1b56da6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

IRremote.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ int MATCH_SPACE (int measured_ticks, int desired_us)
123123
// Gap width is recorded; Ready is cleared; New logging starts
124124
//
125125
#ifdef ESP32
126-
void onTimer()
126+
void IRTimer()
127127
#else
128128
ISR (TIMER_INTR_NAME)
129129
#endif

irRecv.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#ifdef ESP32
55
hw_timer_t *timer;
6-
void onTimer(); // defined in IRremote.cpp
6+
void IRTimer(); // defined in IRremote.cpp
77
#endif
88

99
//+=============================================================================
@@ -126,7 +126,7 @@ void IRrecv::enableIRIn ( )
126126
#ifdef ESP32
127127
// 3 timers, choose #1, 80 divider nanosecond precision, 1 to count up
128128
timer = timerBegin(1, 80, 1);
129-
timerAttachInterrupt(timer, &onTimer, 1);
129+
timerAttachInterrupt(timer, &IRTimer, 1);
130130
// every 50ns, autoreload = true
131131
timerAlarmWrite(timer, 50, true);
132132
timerAlarmEnable(timer);

0 commit comments

Comments
 (0)