Beispiel #1
0
/// step timer
static void timer1_Handler(GPTDriver *gptp)
{   
    palTogglePad(PORT_LED1, PIN_LED1);
	//   
   	
   	queue_step();
   	
   	
}
Beispiel #2
0
/// step timer
static void timer1_Handler(GPTDriver *gptp)
{   
#if defined(PORT_LED1) && defined(PIN_LED1)
    palTogglePad(PORT_LED1, PIN_LED1);
#endif
	//   
   	
   	queue_step();
   	
   	
}
Beispiel #3
0
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;
}
Beispiel #4
0
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);
}
Beispiel #5
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
}
Beispiel #6
0
void TIMER0_IRQHandler (void){
	T0IR |= (1<<0);
	T0TCR = 0;
	queue_step();
}