|
|
@ -346,8 +346,6 @@ ISR(TIMER1_COMPA_vect) { |
|
|
|
|
|
|
|
void Stepper::isr() { |
|
|
|
|
|
|
|
static uint32_t step_remaining = 0; |
|
|
|
|
|
|
|
uint16_t ocr_val; |
|
|
|
|
|
|
|
#define ENDSTOP_NOMINAL_OCR_VAL 3000 // check endstops every 1.5ms to guarantee two stepper ISRs within 5ms for BLTouch
|
|
|
@ -364,6 +362,7 @@ void Stepper::isr() { |
|
|
|
#if ENABLED(ENDSTOP_INTERRUPTS_FEATURE) |
|
|
|
#define SPLIT(L) _SPLIT(L) |
|
|
|
#else // sample endstops in between step pulses
|
|
|
|
static uint32_t step_remaining = 0; |
|
|
|
#define SPLIT(L) do { \ |
|
|
|
_SPLIT(L); \ |
|
|
|
if (ENDSTOPS_ENABLED && L > ENDSTOP_NOMINAL_OCR_VAL) { \ |
|
|
@ -391,7 +390,7 @@ void Stepper::isr() { |
|
|
|
_ENABLE_ISRs(); // re-enable ISRs
|
|
|
|
return; |
|
|
|
} |
|
|
|
# endif |
|
|
|
#endif |
|
|
|
|
|
|
|
if (cleaning_buffer_counter) { |
|
|
|
--cleaning_buffer_counter; |
|
|
|