From d93b2c131aa8ff541c6d1b2c8092a44c98013c6a Mon Sep 17 00:00:00 2001 From: midilab Date: Tue, 17 May 2022 17:37:12 -0300 Subject: [PATCH] added timer tc3 for tests --- src/uClock.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/uClock.cpp b/src/uClock.cpp index 0ff9b21..44e83ea 100755 --- a/src/uClock.cpp +++ b/src/uClock.cpp @@ -37,7 +37,10 @@ IntervalTimer _uclockTimer; #endif // Seedstudio XIAO M0 port #if defined(SEEED_XIAO_M0) -#include +#include +#define _uclockTimer TimerTc3 +//#include +//#define _uclockTimer TimerTcc0 #endif #if defined(ARDUINO_ARCH_AVR) @@ -77,10 +80,10 @@ void uclockInitTimer() #endif #if defined(SEEED_XIAO_M0) - TimerTcc0.initialize(init_clock); + _uclockTimer.initialize(init_clock); // attach to generic uclock ISR - TimerTcc0.attachInterrupt(uclockISR); + _uclockTimer.attachInterrupt(uclockISR); #endif } #endif @@ -207,7 +210,7 @@ void uClockClass::setTimerTempo(float bpm) #endif #if defined(SEEED_XIAO_M0) - TimerTcc0.setPeriod(tick_us_interval); + _uclockTimer.setPeriod(tick_us_interval); #endif #endif }