19#if defined(ARDUINO_ARCH_SAMD)
21#ifndef INTERVALTIMER_H
22#define INTERVALTIMER_H
23#define INTERVALTIMER_MAX_TIMERS 2
26typedef void (*callfunction_t) ();
43 counter_id = INTERVALTIMER_MAX_TIMERS;
47 ~IntervalTimer() {end();}
58 bool begin(callfunction_t callback, uint32_t usec)
volatile;
63 void update(uint32_t usec)
volatile;
75 void priority(uint8_t priority)
volatile;
80 static callfunction_t _TC5_callfunc;
85 static callfunction_t _TC4_callfunc;
92 static bool counter_active[INTERVALTIMER_MAX_TIMERS];
102 uint32_t last_period;
107 uint8_t last_priority;
116extern void TC4_Handler();
121extern void TC5_Handler();