From 1b56da6cc73ec787e3d570e9906d80fad01933df Mon Sep 17 00:00:00 2001 From: Marc MERLIN Date: Sun, 19 Mar 2017 21:28:14 -0700 Subject: [PATCH] Rename ESP32 timer name so that it doesn't conflict with other timers. --- IRremote.cpp | 2 +- irRecv.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/IRremote.cpp b/IRremote.cpp index 9613bea..b438bc1 100644 --- a/IRremote.cpp +++ b/IRremote.cpp @@ -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 diff --git a/irRecv.cpp b/irRecv.cpp index 2f510c4..a15ac0f 100644 --- a/irRecv.cpp +++ b/irRecv.cpp @@ -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);