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:
parent
81cffde4e9
commit
eec0e00f85
4
dda.c
4
dda.c
|
|
@ -764,7 +764,9 @@ void dda_clock() {
|
||||||
uint8_t current_id ;
|
uint8_t current_id ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
dda = queue_current_movement();
|
ATOMIC_START
|
||||||
|
dda = mb_tail_dda;
|
||||||
|
ATOMIC_END
|
||||||
if (dda != last_dda) {
|
if (dda != last_dda) {
|
||||||
move_state.debounce_count_x =
|
move_state.debounce_count_x =
|
||||||
move_state.debounce_count_z =
|
move_state.debounce_count_z =
|
||||||
|
|
|
||||||
14
dda_queue.c
14
dda_queue.c
|
|
@ -51,20 +51,6 @@ uint8_t queue_full() {
|
||||||
return MB_NEXT(mb_head) == mb_tail;
|
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.
|
// This is the one function called by the timer interrupt.
|
||||||
// It calls a few other functions, though.
|
// It calls a few other functions, though.
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ extern DDA *mb_tail_dda;
|
||||||
|
|
||||||
// queue status methods
|
// queue status methods
|
||||||
uint8_t queue_full(void);
|
uint8_t queue_full(void);
|
||||||
DDA *queue_current_movement(void);
|
|
||||||
|
|
||||||
// take one step
|
// take one step
|
||||||
void queue_step(void);
|
void queue_step(void);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue