0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-03-16 03:06:34 +00:00

🧑‍💻 Adjust pulse_phase_isr code guards (#27112)

This commit is contained in:
Mihai 2024-06-16 02:01:36 +03:00 committed by GitHub
parent d7b6acc03d
commit 082dc24865
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1722,7 +1722,7 @@ void Stepper::isr() {
#if MINIMUM_STEPPER_PULSE_NS || MAXIMUM_STEPPER_RATE #if MINIMUM_STEPPER_PULSE_NS || MAXIMUM_STEPPER_RATE
#define ISR_PULSE_CONTROL 1 #define ISR_PULSE_CONTROL 1
#endif #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 #define ISR_MULTI_STEPS 1
#endif #endif
@ -1771,10 +1771,11 @@ void Stepper::pulse_phase_isr() {
// Just update the value we will get at the end of the loop // Just update the value we will get at the end of the loop
step_events_completed += events_to_do; step_events_completed += events_to_do;
// Take multiple steps per interrupt (For high speed moves) TERN_(ISR_PULSE_CONTROL, USING_TIMED_PULSE());
#if ISR_MULTI_STEPS
// Take multiple steps per interrupt. For high speed moves.
#if ENABLED(ISR_MULTI_STEPS)
bool firstStep = true; bool firstStep = true;
USING_TIMED_PULSE();
#endif #endif
// Direct Stepping page? // Direct Stepping page?
@ -2080,7 +2081,7 @@ void Stepper::pulse_phase_isr() {
TERN_(I2S_STEPPER_STREAM, i2s_push_sample()); TERN_(I2S_STEPPER_STREAM, i2s_push_sample());
// TODO: need to deal with MINIMUM_STEPPER_PULSE_NS over i2s // TODO: need to deal with MINIMUM_STEPPER_PULSE_NS over i2s
#if ISR_MULTI_STEPS #if ISR_PULSE_CONTROL
START_TIMED_PULSE(); START_TIMED_PULSE();
AWAIT_HIGH_PULSE(); AWAIT_HIGH_PULSE();
#endif #endif