Browse Source

Use MAX (not max) in stepper.h

Scott Lahteine 7 years ago
parent
commit
7406f04029
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      Marlin/src/module/stepper.h

+ 3
- 3
Marlin/src/module/stepper.h View File

@@ -147,7 +147,7 @@
147 147
 #define MIN_ISR_LOOP_CYCLES (ISR_X_STEPPER_CYCLES + ISR_Y_STEPPER_CYCLES + ISR_Z_STEPPER_CYCLES + ISR_E_STEPPER_CYCLES + ISR_MIXING_STEPPER_CYCLES)
148 148
 
149 149
 // Calculate the minimum MPU cycles needed per pulse to enforce, limited to the max stepper rate
150
-#define _MIN_STEPPER_PULSE_CYCLES(N) max((F_CPU) / (MAXIMUM_STEPPER_RATE), ((F_CPU) / 500000UL) * (N))
150
+#define _MIN_STEPPER_PULSE_CYCLES(N) MAX((F_CPU) / (MAXIMUM_STEPPER_RATE), ((F_CPU) / 500000UL) * (N))
151 151
 #if MINIMUM_STEPPER_PULSE
152 152
   #define MIN_STEPPER_PULSE_CYCLES _MIN_STEPPER_PULSE_CYCLES(MINIMUM_STEPPER_PULSE)
153 153
 #else
@@ -158,7 +158,7 @@
158 158
 #define ADDED_STEP_TICKS ((MIN_STEPPER_PULSE_CYCLES) / (PULSE_TIMER_PRESCALE) - MIN_PULSE_TICKS)
159 159
 
160 160
 // But the user could be enforcing a minimum time, so the loop time is
161
-#define ISR_LOOP_CYCLES (ISR_LOOP_BASE_CYCLES + max(MIN_STEPPER_PULSE_CYCLES, MIN_ISR_LOOP_CYCLES))
161
+#define ISR_LOOP_CYCLES (ISR_LOOP_BASE_CYCLES + MAX(MIN_STEPPER_PULSE_CYCLES, MIN_ISR_LOOP_CYCLES))
162 162
 
163 163
 // If linear advance is enabled, then it is handled separately
164 164
 #if ENABLED(LIN_ADVANCE)
@@ -171,7 +171,7 @@
171 171
   #endif
172 172
 
173 173
   // And the real loop time
174
-  #define ISR_LA_LOOP_CYCLES max(MIN_STEPPER_PULSE_CYCLES, MIN_ISR_LA_LOOP_CYCLES)
174
+  #define ISR_LA_LOOP_CYCLES MAX(MIN_STEPPER_PULSE_CYCLES, MIN_ISR_LA_LOOP_CYCLES)
175 175
 
176 176
 #else
177 177
   #define ISR_LA_LOOP_CYCLES 0UL

Loading…
Cancel
Save