Browse Source

Move macros to stepper/indirection

Scott Lahteine 4 years ago
parent
commit
1bb1ce7475
2 changed files with 257 additions and 244 deletions
  1. 0
    244
      Marlin/src/MarlinCore.h
  2. 257
    0
      Marlin/src/module/stepper/indirection.h

+ 0
- 244
Marlin/src/MarlinCore.h View File

@@ -46,250 +46,6 @@ void idle(
46 46
 
47 47
 void manage_inactivity(const bool ignore_stepper_queue=false);
48 48
 
49
-//
50
-// X, Y, Z Stepper enable / disable
51
-//
52
-#if AXIS_IS_L64XX(X)
53
-  #define X_enable()  NOOP
54
-  #define X_disable() stepperX.free()
55
-#elif HAS_X_ENABLE
56
-  #define X_enable()  X_ENABLE_WRITE( X_ENABLE_ON)
57
-  #define X_disable() X_ENABLE_WRITE(!X_ENABLE_ON)
58
-#else
59
-  #define X_enable()  NOOP
60
-  #define X_disable() NOOP
61
-#endif
62
-
63
-#if AXIS_IS_L64XX(X2)
64
-  #define X2_enable()  NOOP
65
-  #define X2_disable() stepperX2.free()
66
-#elif HAS_X2_ENABLE
67
-  #define X2_enable()  X2_ENABLE_WRITE( X_ENABLE_ON)
68
-  #define X2_disable() X2_ENABLE_WRITE(!X_ENABLE_ON)
69
-#else
70
-  #define X2_enable()  NOOP
71
-  #define X2_disable() NOOP
72
-#endif
73
-
74
-#define  enable_X() do{ X_enable(); X2_enable(); }while(0)
75
-#define disable_X() do{ X_disable(); X2_disable(); CBI(axis_known_position, X_AXIS); }while(0)
76
-
77
-#if AXIS_IS_L64XX(Y)
78
-  #define Y_enable()  NOOP
79
-  #define Y_disable() stepperY.free()
80
-#elif HAS_Y_ENABLE
81
-  #define Y_enable()  Y_ENABLE_WRITE( Y_ENABLE_ON)
82
-  #define Y_disable() Y_ENABLE_WRITE(!Y_ENABLE_ON)
83
-#else
84
-  #define Y_enable()  NOOP
85
-  #define Y_disable() NOOP
86
-#endif
87
-
88
-#if AXIS_IS_L64XX(Y2)
89
-  #define Y2_enable()  NOOP
90
-  #define Y2_disable() stepperY2.free()
91
-#elif HAS_Y2_ENABLE
92
-  #define Y2_enable()  Y2_ENABLE_WRITE( Y_ENABLE_ON)
93
-  #define Y2_disable() Y2_ENABLE_WRITE(!Y_ENABLE_ON)
94
-#else
95
-  #define Y2_enable()  NOOP
96
-  #define Y2_disable() NOOP
97
-#endif
98
-
99
-#define  enable_Y() do{ Y_enable(); Y2_enable(); }while(0)
100
-#define disable_Y() do{ Y_disable(); Y2_disable(); CBI(axis_known_position, Y_AXIS); }while(0)
101
-
102
-#if AXIS_IS_L64XX(Z)
103
-  #define Z_enable()  NOOP
104
-  #define Z_disable() stepperZ.free()
105
-#elif HAS_Z_ENABLE
106
-  #define Z_enable()  Z_ENABLE_WRITE( Z_ENABLE_ON)
107
-  #define Z_disable() Z_ENABLE_WRITE(!Z_ENABLE_ON)
108
-#else
109
-  #define Z_enable()  NOOP
110
-  #define Z_disable() NOOP
111
-#endif
112
-
113
-#if AXIS_IS_L64XX(Z2)
114
-  #define Z2_enable()  NOOP
115
-  #define Z2_disable() stepperZ2.free()
116
-#elif HAS_Z2_ENABLE
117
-  #define Z2_enable()  Z2_ENABLE_WRITE( Z_ENABLE_ON)
118
-  #define Z2_disable() Z2_ENABLE_WRITE(!Z_ENABLE_ON)
119
-#else
120
-  #define Z2_enable()  NOOP
121
-  #define Z2_disable() NOOP
122
-#endif
123
-
124
-#if AXIS_IS_L64XX(Z3)
125
-  #define Z3_enable()  NOOP
126
-  #define Z3_disable() stepperZ3.free()
127
-#elif HAS_Z3_ENABLE
128
-  #define Z3_enable()  Z3_ENABLE_WRITE( Z_ENABLE_ON)
129
-  #define Z3_disable() Z3_ENABLE_WRITE(!Z_ENABLE_ON)
130
-#else
131
-  #define Z3_enable()  NOOP
132
-  #define Z3_disable() NOOP
133
-#endif
134
-
135
-#define  enable_Z() do{ Z_enable(); Z2_enable(); Z3_enable(); }while(0)
136
-#define disable_Z() do{ Z_disable(); Z2_disable(); Z3_disable(); CBI(axis_known_position, Z_AXIS); }while(0)
137
-
138
-//
139
-// Extruder Stepper enable / disable
140
-//
141
-
142
-// define the individual enables/disables
143
-#if AXIS_IS_L64XX(E0)
144
-  #define  E0_enable() NOOP
145
-  #define E0_disable() do{ stepperE0.free(); CBI(axis_known_position, E_AXIS); }while(0)
146
-#elif HAS_E0_ENABLE
147
-  #define  E0_enable() E0_ENABLE_WRITE( E_ENABLE_ON)
148
-  #define E0_disable() E0_ENABLE_WRITE(!E_ENABLE_ON)
149
-#else
150
-  #define  E0_enable() NOOP
151
-  #define E0_disable() NOOP
152
-#endif
153
-
154
-#if AXIS_IS_L64XX(E1)
155
-  #define  E1_enable() NOOP
156
-  #define E1_disable() do{ stepperE1.free(); CBI(axis_known_position, E_AXIS); }while(0)
157
-#elif E_STEPPERS > 1 && HAS_E1_ENABLE
158
-  #define  E1_enable() E1_ENABLE_WRITE( E_ENABLE_ON)
159
-  #define E1_disable() E1_ENABLE_WRITE(!E_ENABLE_ON)
160
-#else
161
-  #define  E1_enable() NOOP
162
-  #define E1_disable() NOOP
163
-#endif
164
-
165
-#if AXIS_IS_L64XX(E2)
166
-  #define  E2_enable() NOOP
167
-  #define E2_disable() do{ stepperE2.free(); CBI(axis_known_position, E_AXIS); }while(0)
168
-#elif E_STEPPERS > 2 && HAS_E2_ENABLE
169
-  #define  E2_enable() E2_ENABLE_WRITE( E_ENABLE_ON)
170
-  #define E2_disable() E2_ENABLE_WRITE(!E_ENABLE_ON)
171
-#else
172
-  #define  E2_enable() NOOP
173
-  #define E2_disable() NOOP
174
-#endif
175
-
176
-#if AXIS_IS_L64XX(E3)
177
-  #define  E3_enable() NOOP
178
-  #define E3_disable() do{ stepperE3.free(); CBI(axis_known_position, E_AXIS); }while(0)
179
-#elif E_STEPPERS > 3 && HAS_E3_ENABLE
180
-  #define  E3_enable() E3_ENABLE_WRITE( E_ENABLE_ON)
181
-  #define E3_disable() E3_ENABLE_WRITE(!E_ENABLE_ON)
182
-#else
183
-  #define  E3_enable() NOOP
184
-  #define E3_disable() NOOP
185
-#endif
186
-
187
-#if AXIS_IS_L64XX(E4)
188
-  #define  E4_enable() NOOP
189
-  #define E4_disable() do{ stepperE4.free(); CBI(axis_known_position, E_AXIS); }while(0)
190
-#elif E_STEPPERS > 4 && HAS_E4_ENABLE
191
-  #define  E4_enable() E4_ENABLE_WRITE( E_ENABLE_ON)
192
-  #define E4_disable() E4_ENABLE_WRITE(!E_ENABLE_ON)
193
-#else
194
-  #define  E4_enable() NOOP
195
-  #define E4_disable() NOOP
196
-#endif
197
-
198
-#if AXIS_IS_L64XX(E5)
199
-  #define  E5_enable() NOOP
200
-  #define E5_disable() do{ stepperE5.free(); CBI(axis_known_position, E_AXIS); }while(0)
201
-#elif E_STEPPERS > 5 && HAS_E5_ENABLE
202
-  #define  E5_enable() E5_ENABLE_WRITE( E_ENABLE_ON)
203
-  #define E5_disable() E5_ENABLE_WRITE(!E_ENABLE_ON)
204
-#else
205
-  #define  E5_enable() NOOP
206
-  #define E5_disable() NOOP
207
-#endif
208
-
209
-#if ENABLED(MIXING_EXTRUDER)
210
-
211
-  /**
212
-   * Mixing steppers synchronize their enable (and direction) together
213
-   */
214
-  #if MIXING_STEPPERS > 5
215
-    #define  enable_E0() { E0_enable();  E1_enable();  E2_enable();  E3_enable();  E4_enable();  E5_enable(); }
216
-    #define disable_E0() { E0_disable(); E1_disable(); E2_disable(); E3_disable(); E4_disable(); E5_disable(); }
217
-  #elif MIXING_STEPPERS > 4
218
-    #define  enable_E0() { E0_enable();  E1_enable();  E2_enable();  E3_enable();  E4_enable(); }
219
-    #define disable_E0() { E0_disable(); E1_disable(); E2_disable(); E3_disable(); E4_disable(); }
220
-  #elif MIXING_STEPPERS > 3
221
-    #define  enable_E0() { E0_enable();  E1_enable();  E2_enable();  E3_enable(); }
222
-    #define disable_E0() { E0_disable(); E1_disable(); E2_disable(); E3_disable(); }
223
-  #elif MIXING_STEPPERS > 2
224
-    #define  enable_E0() { E0_enable();  E1_enable();  E2_enable(); }
225
-    #define disable_E0() { E0_disable(); E1_disable(); E2_disable(); }
226
-  #else
227
-    #define  enable_E0() { E0_enable();  E1_enable(); }
228
-    #define disable_E0() { E0_disable(); E1_disable(); }
229
-  #endif
230
-  #define  enable_E1() NOOP
231
-  #define disable_E1() NOOP
232
-  #define  enable_E2() NOOP
233
-  #define disable_E2() NOOP
234
-  #define  enable_E3() NOOP
235
-  #define disable_E3() NOOP
236
-  #define  enable_E4() NOOP
237
-  #define disable_E4() NOOP
238
-  #define  enable_E5() NOOP
239
-  #define disable_E5() NOOP
240
-
241
-#else // !MIXING_EXTRUDER
242
-
243
-  #if (HAS_E0_ENABLE || AXIS_IS_L64XX(E0))
244
-    #define  enable_E0() E0_enable()
245
-    #define disable_E0() E0_disable()
246
-  #else
247
-    #define  enable_E0() NOOP
248
-    #define disable_E0() NOOP
249
-  #endif
250
-
251
-  #if E_STEPPERS > 1 && (HAS_E1_ENABLE || AXIS_IS_L64XX(E1))
252
-    #define  enable_E1() E1_enable()
253
-    #define disable_E1() E1_disable()
254
-  #else
255
-    #define  enable_E1() NOOP
256
-    #define disable_E1() NOOP
257
-  #endif
258
-
259
-  #if E_STEPPERS > 2 && (HAS_E2_ENABLE || AXIS_IS_L64XX(E2))
260
-    #define  enable_E2() E2_enable()
261
-    #define disable_E2() E2_disable()
262
-  #else
263
-    #define  enable_E2() NOOP
264
-    #define disable_E2() NOOP
265
-  #endif
266
-
267
-  #if E_STEPPERS > 3 && (HAS_E3_ENABLE || AXIS_IS_L64XX(E3))
268
-    #define  enable_E3() E3_enable()
269
-    #define disable_E3() E3_disable()
270
-  #else
271
-    #define  enable_E3() NOOP
272
-    #define disable_E3() NOOP
273
-  #endif
274
-
275
-  #if E_STEPPERS > 4 && (HAS_E4_ENABLE || AXIS_IS_L64XX(E4))
276
-    #define  enable_E4() E4_enable()
277
-    #define disable_E4() E4_disable()
278
-  #else
279
-    #define  enable_E4() NOOP
280
-    #define disable_E4() NOOP
281
-  #endif
282
-
283
-  #if E_STEPPERS > 5 && (HAS_E5_ENABLE || AXIS_IS_L64XX(E5))
284
-    #define  enable_E5() E5_enable()
285
-    #define disable_E5() E5_disable()
286
-  #else
287
-    #define  enable_E5() NOOP
288
-    #define disable_E5() NOOP
289
-  #endif
290
-
291
-#endif // !MIXING_EXTRUDER
292
-
293 49
 #if ENABLED(EXPERIMENTAL_I2CBUS)
294 50
   #include "feature/twibus.h"
295 51
   extern TWIBus i2c;

+ 257
- 0
Marlin/src/module/stepper/indirection.h View File

@@ -397,3 +397,260 @@ void reset_stepper_drivers();    // Called by settings.load / settings.reset
397 397
   #define    REV_E_DIR(E)   NOOP
398 398
 
399 399
 #endif
400
+
401
+//
402
+// X, Y, Z Stepper enable / disable
403
+//
404
+#if AXIS_DRIVER_TYPE_X(L6470)
405
+  extern L6470 stepperX;
406
+  #define X_enable()  NOOP
407
+  #define X_disable() stepperX.free()
408
+#elif HAS_X_ENABLE
409
+  #define X_enable()  X_ENABLE_WRITE( X_ENABLE_ON)
410
+  #define X_disable() X_ENABLE_WRITE(!X_ENABLE_ON)
411
+#else
412
+  #define X_enable()  NOOP
413
+  #define X_disable() NOOP
414
+#endif
415
+
416
+#if AXIS_DRIVER_TYPE_X2(L6470)
417
+  extern L6470 stepperX2;
418
+  #define X2_enable()  NOOP
419
+  #define X2_disable() stepperX2.free()
420
+#elif HAS_X2_ENABLE
421
+  #define X2_enable()  X2_ENABLE_WRITE( X_ENABLE_ON)
422
+  #define X2_disable() X2_ENABLE_WRITE(!X_ENABLE_ON)
423
+#else
424
+  #define X2_enable()  NOOP
425
+  #define X2_disable() NOOP
426
+#endif
427
+
428
+#define  enable_X() do{ X_enable(); X2_enable(); }while(0)
429
+#define disable_X() do{ X_disable(); X2_disable(); CBI(axis_known_position, X_AXIS); }while(0)
430
+
431
+#if AXIS_DRIVER_TYPE_Y(L6470)
432
+  extern L6470 stepperY;
433
+  #define Y_enable()  NOOP
434
+  #define Y_disable() stepperY.free()
435
+#elif HAS_Y_ENABLE
436
+  #define Y_enable()  Y_ENABLE_WRITE( Y_ENABLE_ON)
437
+  #define Y_disable() Y_ENABLE_WRITE(!Y_ENABLE_ON)
438
+#else
439
+  #define Y_enable()  NOOP
440
+  #define Y_disable() NOOP
441
+#endif
442
+
443
+#if AXIS_DRIVER_TYPE_Y2(L6470)
444
+  extern L6470 stepperY2;
445
+  #define Y2_enable()  NOOP
446
+  #define Y2_disable() stepperY2.free()
447
+#elif HAS_Y2_ENABLE
448
+  #define Y2_enable()  Y2_ENABLE_WRITE( Y_ENABLE_ON)
449
+  #define Y2_disable() Y2_ENABLE_WRITE(!Y_ENABLE_ON)
450
+#else
451
+  #define Y2_enable()  NOOP
452
+  #define Y2_disable() NOOP
453
+#endif
454
+
455
+#define  enable_Y() do{ Y_enable(); Y2_enable(); }while(0)
456
+#define disable_Y() do{ Y_disable(); Y2_disable(); CBI(axis_known_position, Y_AXIS); }while(0)
457
+
458
+#if AXIS_DRIVER_TYPE_Z(L6470)
459
+  extern L6470 stepperZ;
460
+  #define Z_enable()  NOOP
461
+  #define Z_disable() stepperZ.free()
462
+#elif HAS_Z_ENABLE
463
+  #define Z_enable()  Z_ENABLE_WRITE( Z_ENABLE_ON)
464
+  #define Z_disable() Z_ENABLE_WRITE(!Z_ENABLE_ON)
465
+#else
466
+  #define Z_enable()  NOOP
467
+  #define Z_disable() NOOP
468
+#endif
469
+
470
+#if AXIS_DRIVER_TYPE_Z2(L6470)
471
+  extern L6470 stepperZ2;
472
+  #define Z2_enable()  NOOP
473
+  #define Z2_disable() stepperZ2.free()
474
+#elif HAS_Z2_ENABLE
475
+  #define Z2_enable()  Z2_ENABLE_WRITE( Z_ENABLE_ON)
476
+  #define Z2_disable() Z2_ENABLE_WRITE(!Z_ENABLE_ON)
477
+#else
478
+  #define Z2_enable()  NOOP
479
+  #define Z2_disable() NOOP
480
+#endif
481
+
482
+#if AXIS_DRIVER_TYPE_Z3(L6470)
483
+  extern L6470 stepperZ3;
484
+  #define Z3_enable()  NOOP
485
+  #define Z3_disable() stepperZ3.free()
486
+#elif HAS_Z3_ENABLE
487
+  #define Z3_enable()  Z3_ENABLE_WRITE( Z_ENABLE_ON)
488
+  #define Z3_disable() Z3_ENABLE_WRITE(!Z_ENABLE_ON)
489
+#else
490
+  #define Z3_enable()  NOOP
491
+  #define Z3_disable() NOOP
492
+#endif
493
+
494
+#define  enable_Z() do{ Z_enable(); Z2_enable(); Z3_enable(); }while(0)
495
+#define disable_Z() do{ Z_disable(); Z2_disable(); Z3_disable(); CBI(axis_known_position, Z_AXIS); }while(0)
496
+
497
+//
498
+// Extruder Stepper enable / disable
499
+//
500
+
501
+// define the individual enables/disables
502
+#if AXIS_DRIVER_TYPE_E0(L6470)
503
+  extern L6470 stepperE0;
504
+  #define  E0_enable() NOOP
505
+  #define E0_disable() do{ stepperE0.free(); CBI(axis_known_position, E_AXIS); }while(0)
506
+#elif HAS_E0_ENABLE
507
+  #define  E0_enable() E0_ENABLE_WRITE( E_ENABLE_ON)
508
+  #define E0_disable() E0_ENABLE_WRITE(!E_ENABLE_ON)
509
+#else
510
+  #define  E0_enable() NOOP
511
+  #define E0_disable() NOOP
512
+#endif
513
+
514
+#if AXIS_DRIVER_TYPE_E1(L6470)
515
+  extern L6470 stepperE1;
516
+  #define  E1_enable() NOOP
517
+  #define E1_disable() do{ stepperE1.free(); CBI(axis_known_position, E_AXIS); }while(0)
518
+#elif E_STEPPERS > 1 && HAS_E1_ENABLE
519
+  #define  E1_enable() E1_ENABLE_WRITE( E_ENABLE_ON)
520
+  #define E1_disable() E1_ENABLE_WRITE(!E_ENABLE_ON)
521
+#else
522
+  #define  E1_enable() NOOP
523
+  #define E1_disable() NOOP
524
+#endif
525
+
526
+#if AXIS_DRIVER_TYPE_E2(L6470)
527
+  extern L6470 stepperE2;
528
+  #define  E2_enable() NOOP
529
+  #define E2_disable() do{ stepperE2.free(); CBI(axis_known_position, E_AXIS); }while(0)
530
+#elif E_STEPPERS > 2 && HAS_E2_ENABLE
531
+  #define  E2_enable() E2_ENABLE_WRITE( E_ENABLE_ON)
532
+  #define E2_disable() E2_ENABLE_WRITE(!E_ENABLE_ON)
533
+#else
534
+  #define  E2_enable() NOOP
535
+  #define E2_disable() NOOP
536
+#endif
537
+
538
+#if AXIS_DRIVER_TYPE_E3(L6470)
539
+  extern L6470 stepperE3;
540
+  #define  E3_enable() NOOP
541
+  #define E3_disable() do{ stepperE3.free(); CBI(axis_known_position, E_AXIS); }while(0)
542
+#elif E_STEPPERS > 3 && HAS_E3_ENABLE
543
+  #define  E3_enable() E3_ENABLE_WRITE( E_ENABLE_ON)
544
+  #define E3_disable() E3_ENABLE_WRITE(!E_ENABLE_ON)
545
+#else
546
+  #define  E3_enable() NOOP
547
+  #define E3_disable() NOOP
548
+#endif
549
+
550
+#if AXIS_DRIVER_TYPE_E4(L6470)
551
+  extern L6470 stepperE4;
552
+  #define  E4_enable() NOOP
553
+  #define E4_disable() do{ stepperE4.free(); CBI(axis_known_position, E_AXIS); }while(0)
554
+#elif E_STEPPERS > 4 && HAS_E4_ENABLE
555
+  #define  E4_enable() E4_ENABLE_WRITE( E_ENABLE_ON)
556
+  #define E4_disable() E4_ENABLE_WRITE(!E_ENABLE_ON)
557
+#else
558
+  #define  E4_enable() NOOP
559
+  #define E4_disable() NOOP
560
+#endif
561
+
562
+#if AXIS_DRIVER_TYPE_E5(L6470)
563
+  extern L6470 stepperE5;
564
+  #define  E5_enable() NOOP
565
+  #define E5_disable() do{ stepperE5.free(); CBI(axis_known_position, E_AXIS); }while(0)
566
+#elif E_STEPPERS > 5 && HAS_E5_ENABLE
567
+  #define  E5_enable() E5_ENABLE_WRITE( E_ENABLE_ON)
568
+  #define E5_disable() E5_ENABLE_WRITE(!E_ENABLE_ON)
569
+#else
570
+  #define  E5_enable() NOOP
571
+  #define E5_disable() NOOP
572
+#endif
573
+
574
+#if ENABLED(MIXING_EXTRUDER)
575
+
576
+  /**
577
+   * Mixing steppers synchronize their enable (and direction) together
578
+   */
579
+  #if MIXING_STEPPERS > 5
580
+    #define  enable_E0() { E0_enable();  E1_enable();  E2_enable();  E3_enable();  E4_enable();  E5_enable(); }
581
+    #define disable_E0() { E0_disable(); E1_disable(); E2_disable(); E3_disable(); E4_disable(); E5_disable(); }
582
+  #elif MIXING_STEPPERS > 4
583
+    #define  enable_E0() { E0_enable();  E1_enable();  E2_enable();  E3_enable();  E4_enable(); }
584
+    #define disable_E0() { E0_disable(); E1_disable(); E2_disable(); E3_disable(); E4_disable(); }
585
+  #elif MIXING_STEPPERS > 3
586
+    #define  enable_E0() { E0_enable();  E1_enable();  E2_enable();  E3_enable(); }
587
+    #define disable_E0() { E0_disable(); E1_disable(); E2_disable(); E3_disable(); }
588
+  #elif MIXING_STEPPERS > 2
589
+    #define  enable_E0() { E0_enable();  E1_enable();  E2_enable(); }
590
+    #define disable_E0() { E0_disable(); E1_disable(); E2_disable(); }
591
+  #else
592
+    #define  enable_E0() { E0_enable();  E1_enable(); }
593
+    #define disable_E0() { E0_disable(); E1_disable(); }
594
+  #endif
595
+  #define  enable_E1() NOOP
596
+  #define disable_E1() NOOP
597
+  #define  enable_E2() NOOP
598
+  #define disable_E2() NOOP
599
+  #define  enable_E3() NOOP
600
+  #define disable_E3() NOOP
601
+  #define  enable_E4() NOOP
602
+  #define disable_E4() NOOP
603
+  #define  enable_E5() NOOP
604
+  #define disable_E5() NOOP
605
+
606
+#else // !MIXING_EXTRUDER
607
+
608
+  #if HAS_E0_ENABLE
609
+    #define  enable_E0() E0_enable()
610
+    #define disable_E0() E0_disable()
611
+  #else
612
+    #define  enable_E0() NOOP
613
+    #define disable_E0() NOOP
614
+  #endif
615
+
616
+  #if E_STEPPERS > 1 && HAS_E1_ENABLE
617
+    #define  enable_E1() E1_enable()
618
+    #define disable_E1() E1_disable()
619
+  #else
620
+    #define  enable_E1() NOOP
621
+    #define disable_E1() NOOP
622
+  #endif
623
+
624
+  #if E_STEPPERS > 2 && HAS_E2_ENABLE
625
+    #define  enable_E2() E2_enable()
626
+    #define disable_E2() E2_disable()
627
+  #else
628
+    #define  enable_E2() NOOP
629
+    #define disable_E2() NOOP
630
+  #endif
631
+
632
+  #if E_STEPPERS > 3 && HAS_E3_ENABLE
633
+    #define  enable_E3() E3_enable()
634
+    #define disable_E3() E3_disable()
635
+  #else
636
+    #define  enable_E3() NOOP
637
+    #define disable_E3() NOOP
638
+  #endif
639
+
640
+  #if E_STEPPERS > 4 && HAS_E4_ENABLE
641
+    #define  enable_E4() E4_enable()
642
+    #define disable_E4() E4_disable()
643
+  #else
644
+    #define  enable_E4() NOOP
645
+    #define disable_E4() NOOP
646
+  #endif
647
+
648
+  #if E_STEPPERS > 5 && HAS_E5_ENABLE
649
+    #define  enable_E5() E5_enable()
650
+    #define disable_E5() E5_disable()
651
+  #else
652
+    #define  enable_E5() NOOP
653
+    #define disable_E5() NOOP
654
+  #endif
655
+
656
+#endif // !MIXING_EXTRUDER

Loading…
Cancel
Save