From 45bf1eaed15a9b8eee28d70d7d6b7e529ed0d681 Mon Sep 17 00:00:00 2001 From: midilab Date: Fri, 21 Oct 2022 04:22:29 -0400 Subject: [PATCH] force the use of defined object TimerTcc0 to avoid problems with xiao mcu --- src/uClock.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/uClock.cpp b/src/uClock.cpp index b16c6f3..ab9c868 100755 --- a/src/uClock.cpp +++ b/src/uClock.cpp @@ -39,10 +39,10 @@ IntervalTimer _uclockTimer; #if defined(SEEED_XIAO_M0) // 24 bits timer #include -#define _uclockTimer TimerTcc0 +// uses TimerTcc0 // 16 bits timer //#include -//#define _uclockTimer TimerTc3 +// uses TimerTc3 #endif #if defined(ARDUINO_ARCH_AVR) @@ -82,10 +82,10 @@ void uclockInitTimer() #endif #if defined(SEEED_XIAO_M0) - _uclockTimer.initialize(init_clock); + TimerTcc0.initialize(init_clock); // attach to generic uclock ISR - _uclockTimer.attachInterrupt(uclockISR); + TimerTcc0.attachInterrupt(uclockISR); #endif } #endif @@ -211,7 +211,7 @@ void uClockClass::setTimerTempo(float bpm) #endif #if defined(SEEED_XIAO_M0) - _uclockTimer.setPeriod(tick_us_interval); + TimerTcc0.setPeriod(tick_us_interval); #endif #endif }