// timer ISR TC2 ch 0 void TC6_Handler ( void ) { TC_GetStatus(TC2, 0); if (toggle_count != 0){ // toggle pin TODO better digitalWrite(tone_pin,pin_state= !pin_state); if (toggle_count > 0) toggle_count--; } else { noTone(tone_pin); } }
void TC3_Handler(void) { TC_GetStatus(TC1, 0); if (timer6_toggle_count != 0) { // toggle the pin *timer6_pin_port ^= timer6_pin_mask; if (timer6_toggle_count > 0) timer6_toggle_count--; } else { disableTimer(6); *timer6_pin_port &= ~(timer6_pin_mask); // keep pin low after stop } }
void TC8_Handler(void){ TC_GetStatus(TC2, 2); DueTimer::callbacks[8](); }
void TC6_Handler(void){ TC_GetStatus(TC2, 0); DueTimer::callbacks[6](); }
void TC7_Handler(void){ TC_GetStatus(TC2, 1); DueTimer::callbacks[7](); }
void TC4_Handler(void){ TC_GetStatus(TC1, 1); DueTimer::callbacks[4](); }
void TC5_Handler(void){ TC_GetStatus(TC1, 2); DueTimer::callbacks[5](); }
void TC2_Handler(void){ TC_GetStatus(TC0, 2); DueTimer::callbacks[2](); }
void TC3_Handler(void){ TC_GetStatus(TC1, 0); DueTimer::callbacks[3](); }
void TC1_Handler(void){ TC_GetStatus(TC0, 1); DueTimer::callbacks[1](); }
void TC0_Handler(void){ TC_GetStatus(TC0, 0); DueTimer::callbacks[0](); }
void TC3_Handler() { TC_GetStatus(TC1, 0); reprap.Interrupt(); }
void HAL_timer_isr_prologue(const uint8_t timer_num) { const tTimerConfig *pConfig = &TimerConfig[timer_num]; TC_GetStatus(pConfig->pTimerRegs, pConfig->channel); }
void TC7_Handler(){ TC_GetStatus(TC2, 1); scan_running_dmds(); }