From cea2a656a58bb9d24b837ee7d721bcb9b13b8039 Mon Sep 17 00:00:00 2001 From: "Jens Ch. Restemeier" Date: Fri, 10 Jun 2011 22:58:25 +1000 Subject: [PATCH] Fix assumption that debug led is on SCK pin Signed-off-by: Michael Moon --- timer.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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.