Rename ESP32 timer name so that it doesn't conflict with other timers.

This commit is contained in:
Marc MERLIN
2017-03-19 21:28:14 -07:00
parent aa8f7b31fe
commit 1b56da6cc7
2 changed files with 3 additions and 3 deletions

View File

@@ -123,7 +123,7 @@ int MATCH_SPACE (int measured_ticks, int desired_us)
// Gap width is recorded; Ready is cleared; New logging starts // Gap width is recorded; Ready is cleared; New logging starts
// //
#ifdef ESP32 #ifdef ESP32
void onTimer() void IRTimer()
#else #else
ISR (TIMER_INTR_NAME) ISR (TIMER_INTR_NAME)
#endif #endif

View File

@@ -3,7 +3,7 @@
#ifdef ESP32 #ifdef ESP32
hw_timer_t *timer; hw_timer_t *timer;
void onTimer(); // defined in IRremote.cpp void IRTimer(); // defined in IRremote.cpp
#endif #endif
//+============================================================================= //+=============================================================================
@@ -126,7 +126,7 @@ void IRrecv::enableIRIn ( )
#ifdef ESP32 #ifdef ESP32
// 3 timers, choose #1, 80 divider nanosecond precision, 1 to count up // 3 timers, choose #1, 80 divider nanosecond precision, 1 to count up
timer = timerBegin(1, 80, 1); timer = timerBegin(1, 80, 1);
timerAttachInterrupt(timer, &onTimer, 1); timerAttachInterrupt(timer, &IRTimer, 1);
// every 50ns, autoreload = true // every 50ns, autoreload = true
timerAlarmWrite(timer, 50, true); timerAlarmWrite(timer, 50, true);
timerAlarmEnable(timer); timerAlarmEnable(timer);