mirror of
https://github.com/Theaninova/Arduino-IRremote.git
synced 2025-12-11 00:46:14 +00:00
Rename ESP32 timer name so that it doesn't conflict with other timers.
This commit is contained in:
@@ -123,7 +123,7 @@ int MATCH_SPACE (int measured_ticks, int desired_us)
|
||||
// Gap width is recorded; Ready is cleared; New logging starts
|
||||
//
|
||||
#ifdef ESP32
|
||||
void onTimer()
|
||||
void IRTimer()
|
||||
#else
|
||||
ISR (TIMER_INTR_NAME)
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#ifdef ESP32
|
||||
hw_timer_t *timer;
|
||||
void onTimer(); // defined in IRremote.cpp
|
||||
void IRTimer(); // defined in IRremote.cpp
|
||||
#endif
|
||||
|
||||
//+=============================================================================
|
||||
@@ -126,7 +126,7 @@ void IRrecv::enableIRIn ( )
|
||||
#ifdef ESP32
|
||||
// 3 timers, choose #1, 80 divider nanosecond precision, 1 to count up
|
||||
timer = timerBegin(1, 80, 1);
|
||||
timerAttachInterrupt(timer, &onTimer, 1);
|
||||
timerAttachInterrupt(timer, &IRTimer, 1);
|
||||
// every 50ns, autoreload = true
|
||||
timerAlarmWrite(timer, 50, true);
|
||||
timerAlarmEnable(timer);
|
||||
|
||||
Reference in New Issue
Block a user