From 5e1ce4ec964de4eb8dce850d8e0656bf8e5a0200 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Tue, 5 Oct 2010 13:18:59 +0200 Subject: [PATCH] Refined the check wether the timer interrupt is enabled, as per triffid's request. --- dda_queue.c | 2 +- timer.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dda_queue.c b/dda_queue.c index 3ef2665..87effa7 100644 --- a/dda_queue.c +++ b/dda_queue.c @@ -84,7 +84,7 @@ void enqueue(TARGET *t) { #endif // fire up in case we're not running yet - if (TIMSK1 == 0) + if (timerInterruptIsEnabled() == 0) next_move(); } diff --git a/timer.h b/timer.h index 67773a8..810273d 100644 --- a/timer.h +++ b/timer.h @@ -30,5 +30,6 @@ void delayMicrosecondsInterruptible(unsigned int us); #define enableTimerInterrupt() do { TIMSK1 |= (1<