dda_queue.c/.h: eliminate queue_current_movement().

Again no stepping performance improvement, but another 34 bytes
off the binary size:

  ATmega sizes               '168   '328(P)   '644(P)     '1280
  Program:  19364 bytes      136%       64%       31%       16%
     Data:   2179 bytes      213%      107%       54%       27%
   EEPROM:     32 bytes        4%        2%        2%        1%
This commit is contained in:
Markus Hitter 2016-11-27 20:38:31 +01:00
parent 81cffde4e9
commit eec0e00f85
3 changed files with 3 additions and 16 deletions

4
dda.c
View File

@ -764,7 +764,9 @@ void dda_clock() {
uint8_t current_id ;
#endif
dda = queue_current_movement();
ATOMIC_START
dda = mb_tail_dda;
ATOMIC_END
if (dda != last_dda) {
move_state.debounce_count_x =
move_state.debounce_count_z =

View File

@ -51,20 +51,6 @@ uint8_t queue_full() {
return MB_NEXT(mb_head) == mb_tail;
}
/// Return the current movement, or NULL, if there's no movement going on.
DDA *queue_current_movement() {
DDA* current;
ATOMIC_START
current = &movebuffer[mb_tail];
if ( ! current->live)
current = NULL;
ATOMIC_END
return current;
}
// -------------------------------------------------------
// This is the one function called by the timer interrupt.
// It calls a few other functions, though.

View File

@ -22,7 +22,6 @@ extern DDA *mb_tail_dda;
// queue status methods
uint8_t queue_full(void);
DDA *queue_current_movement(void);
// take one step
void queue_step(void);