diff --git a/timer.c b/timer.c index f881ab3..2a555d7 100644 --- a/timer.c +++ b/timer.c @@ -77,7 +77,9 @@ ISR(TIMER1_COMPA_vect) { // Check if this is a real step, or just a next_step_time "overflow" if (next_step_time < 65536) { // step! - WRITE(SCK, 1); + #ifdef DEBUG_LED_PIN + WRITE(DEBUG_LED_PIN, 1); + #endif // disable this interrupt. if we set a new timeout, it will be re-enabled when appropriate TIMSK1 &= ~MASK(OCIE1A); @@ -87,7 +89,9 @@ ISR(TIMER1_COMPA_vect) { queue_step(); // led off - WRITE(SCK, 0); + #ifdef DEBUG_LED_PIN + WRITE(DEBUG_LED_PIN, 0); + #endif // Enable the timer1_compa interrupt, if needed, // but only do it after disabling global interrupts.