timer.c: get rid of explicitely disabling the step timer.

This is no longer neccessary, as the step timer is not designed to
fire always exactly once.

Saves 54 bytes binary size.
This commit is contained in:
Markus Hitter 2011-11-17 13:33:31 +01:00
parent 53490bb318
commit 9c489911b6
2 changed files with 36 additions and 49 deletions

View File

@ -167,9 +167,6 @@ void next_move() {
dda_start(current_movebuffer);
}
}
if (queue_empty())
setTimer(0);
}
/// DEBUG - print queue.

10
timer.c
View File

@ -138,8 +138,6 @@ void setTimer(uint32_t delay)
// re-enable clock interrupt in case we're recovering from emergency stop
TIMSK1 |= MASK(OCIE1B);
if (delay > 0) {
// if the delay is too small use a minimum delay so that there is time
// to set everything up before the timer expires.
@ -180,14 +178,6 @@ void setTimer(uint32_t delay)
CLI_SEI_BUG_MEMORY_BARRIER();
TIMSK1 |= MASK(OCIE1A);
} else {
// TODO: as the interrupt is designed to fire only once,
// doing a setTimer(0) should be obsolete.
// flag: move has ended
next_step_time = 0;
TIMSK1 &= ~MASK(OCIE1A);
}
// restore interrupt flag
MEMORY_BARRIER();
SREG = sreg;