Fix assumption that debug led is on SCK pin
Signed-off-by: Michael Moon <triffid.hunter@gmail.com>
This commit is contained in:
parent
b39a7b8d84
commit
cea2a656a5
8
timer.c
8
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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue