|
|
@ -39,10 +39,10 @@ IntervalTimer _uclockTimer; |
|
|
|
#if defined(SEEED_XIAO_M0) |
|
|
|
#if defined(SEEED_XIAO_M0) |
|
|
|
// 24 bits timer
|
|
|
|
// 24 bits timer
|
|
|
|
#include <TimerTCC0.h> |
|
|
|
#include <TimerTCC0.h> |
|
|
|
#define _uclockTimer TimerTcc0 |
|
|
|
// uses TimerTcc0
|
|
|
|
// 16 bits timer
|
|
|
|
// 16 bits timer
|
|
|
|
//#include <TimerTC3.h>
|
|
|
|
//#include <TimerTC3.h>
|
|
|
|
//#define _uclockTimer TimerTc3
|
|
|
|
// uses TimerTc3
|
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if defined(ARDUINO_ARCH_AVR) |
|
|
|
#if defined(ARDUINO_ARCH_AVR) |
|
|
@ -82,10 +82,10 @@ void uclockInitTimer() |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if defined(SEEED_XIAO_M0) |
|
|
|
#if defined(SEEED_XIAO_M0) |
|
|
|
_uclockTimer.initialize(init_clock); |
|
|
|
TimerTcc0.initialize(init_clock); |
|
|
|
|
|
|
|
|
|
|
|
// attach to generic uclock ISR
|
|
|
|
// attach to generic uclock ISR
|
|
|
|
_uclockTimer.attachInterrupt(uclockISR); |
|
|
|
TimerTcc0.attachInterrupt(uclockISR); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -211,7 +211,7 @@ void uClockClass::setTimerTempo(float bpm) |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if defined(SEEED_XIAO_M0) |
|
|
|
#if defined(SEEED_XIAO_M0) |
|
|
|
_uclockTimer.setPeriod(tick_us_interval); |
|
|
|
TimerTcc0.setPeriod(tick_us_interval); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|