From 082dc248659c7d9deb6209a265908c2ef18f595d Mon Sep 17 00:00:00 2001 From: Mihai <299015+mh-dm@users.noreply.github.com> Date: Sun, 16 Jun 2024 02:01:36 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Adjust=20pu?= =?UTF-8?q?lse=5Fphase=5Fisr=20code=20guards=20(#27112)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/stepper.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 47b9f715dff..f5a9f6d0a8a 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -1722,7 +1722,7 @@ void Stepper::isr() { #if MINIMUM_STEPPER_PULSE_NS || MAXIMUM_STEPPER_RATE #define ISR_PULSE_CONTROL 1 #endif -#if ISR_PULSE_CONTROL && DISABLED(I2S_STEPPER_STREAM) +#if ISR_PULSE_CONTROL && MULTISTEPPING_LIMIT > 1 && DISABLED(I2S_STEPPER_STREAM) #define ISR_MULTI_STEPS 1 #endif @@ -1771,10 +1771,11 @@ void Stepper::pulse_phase_isr() { // Just update the value we will get at the end of the loop step_events_completed += events_to_do; - // Take multiple steps per interrupt (For high speed moves) - #if ISR_MULTI_STEPS + TERN_(ISR_PULSE_CONTROL, USING_TIMED_PULSE()); + + // Take multiple steps per interrupt. For high speed moves. + #if ENABLED(ISR_MULTI_STEPS) bool firstStep = true; - USING_TIMED_PULSE(); #endif // Direct Stepping page? @@ -2080,7 +2081,7 @@ void Stepper::pulse_phase_isr() { TERN_(I2S_STEPPER_STREAM, i2s_push_sample()); // TODO: need to deal with MINIMUM_STEPPER_PULSE_NS over i2s - #if ISR_MULTI_STEPS + #if ISR_PULSE_CONTROL START_TIMED_PULSE(); AWAIT_HIGH_PULSE(); #endif