4 #include "AudioTimer/AudioTimerBase.h"
8 class TimerAlarmRepeatingDriverSTM32;
9 static TimerAlarmRepeatingDriverSTM32 *timerAlarmRepeating =
nullptr;
10 typedef void (*repeating_timer_callback_t)(
void *obj);
29 if (this->timer !=
nullptr) {
32 this->timer =
new HardwareTimer(timers[timerIdx]);
33 timer_index = timerIdx;
40 bool begin(repeating_timer_callback_t callback_f, uint32_t time,
43 LOGI(
"Using timer TIM%d", timer_index + 1);
44 timer->attachInterrupt(std::bind(callback_f,
object));
49 timer->setOverflow(time * 1000, MICROSEC_FORMAT);
52 timer->setOverflow(time, MICROSEC_FORMAT);
67 HardwareTimer *timer =
nullptr;
69 TIM_TypeDef *timers[6] = {TIM1, TIM2, TIM3, TIM4, TIM5};
TimeUnit
Time Units.
Definition: AudioTypes.h:43