/// step timer static void timer1_Handler(GPTDriver *gptp) { palTogglePad(PORT_LED1, PIN_LED1); // queue_step(); }
/// step timer static void timer1_Handler(GPTDriver *gptp) { #if defined(PORT_LED1) && defined(PIN_LED1) palTogglePad(PORT_LED1, PIN_LED1); #endif // queue_step(); }
static void timer1_isr(int cause, siginfo_t *HowCome, void *ucontext) { if (!sim_interrupts || !timerInterruptIsEnabled()) return; sim_interrupts = false; WRITE(SCK, 1); queue_step(); WRITE(SCK, 0); sim_interrupts = true; }
void timer1_compa_isr() { // led on WRITE(SCK, 1); // disable this interrupt. if we set a new timeout, it will be re-enabled when appropriate TIMSK1 &= ~MASK(OCIE1A); // stepper tick queue_step(); // led off WRITE(SCK, 0); }
/** Step interrupt. Happens for every stepper motor step. Must have the same name as in cmsis-startup_lpc11xx.s */ void TIMER32_0_IRQHandler(void) { #ifdef DEBUG_LED_PIN WRITE(DEBUG_LED_PIN, 1); #endif /** Turn off interrupt generation, timer counter continues. As this interrupt is the only use of this timer, there's no need for a read-modify-write. */ LPC_TMR32B0->MCR = 0; /** We have to "reset" this interrupt, else it'll be triggered over and over again. */ LPC_TMR32B0->IR = (1 << 0); // Clear match on channel 0. queue_step(); #ifdef DEBUG_LED_PIN WRITE(DEBUG_LED_PIN, 0); #endif }
void TIMER0_IRQHandler (void){ T0IR |= (1<<0); T0TCR = 0; queue_step(); }