HardwareTimer::HardwareTimer(uint8 timerNum) {
    rcc_clk_id timerID = (rcc_clk_id)(RCC_TIMER1 + (timerNum - 1));
    this->dev = NULL;
    noInterrupts(); // Hack to ensure we're the only ones using
                    // set_this_dev() and friends. TODO: use a lock.
    this_id = timerID;
    this_devp = &this->dev;
    timer_foreach(set_this_dev);
    interrupts();
    ASSERT(this->dev != NULL);
}
Ejemplo n.º 2
0
static void setup_timers(void) {
    timer_foreach(timer_default_config);
}
Ejemplo n.º 3
0
void init_all_timers(uint16 prescale) {
    init_all_timers_prescale = prescale;
    timer_foreach(set_prescale);
}
Ejemplo n.º 4
0
static void setupTimers() {
    timer_foreach(timerDefaultConfig);
}
Ejemplo n.º 5
0
__weak void board_setup_timers(void) {
    timer_foreach(timer_default_config);
}