diff --git a/stepper.c b/stepper.c index dba9593..467fed5 100644 --- a/stepper.c +++ b/stepper.c @@ -185,7 +185,7 @@ SIGNAL(TIMER1_COMPA_vect) // printString(" <-- delta\n\r"); current_block = NULL; // move the block buffer tail to the next instruction - block_buffer_tail = (block_buffer_tail + 1) % BLOCK_BUFFER_SIZE; + block_buffer_tail = (block_buffer_tail + 1) % BLOCK_BUFFER_SIZE; } } else { out_bits = 0; @@ -255,15 +255,6 @@ void st_synchronize() while(block_buffer_tail != block_buffer_head) { sleep_mode(); } } -// Cancel all buffered steps -void st_flush() -{ - cli(); - block_buffer_tail = block_buffer_head; - current_block = NULL; - sei(); -} - // Configures the prescaler and ceiling of timer 1 to produce the given rate as accurately as possible. // Returns the actual number of cycles per interrupt uint32_t config_step_timer(uint32_t cycles) diff --git a/stepper.h b/stepper.h index e51e2a2..1d83a9e 100644 --- a/stepper.h +++ b/stepper.h @@ -37,9 +37,6 @@ void st_get_position_steps(int32_t (*vector)[3]); // Block until all buffered steps are executed void st_synchronize(); -// Cancel all pending steps -void st_flush(); - // Execute the homing cycle void st_go_home();