Bläddra i källkod

Fix automatic stepper assignment for X/Y/Z dual stepper drivers

Thomas Moore 7 år sedan
förälder
incheckning
277eb16d67
1 ändrade filer med 48 tillägg och 3 borttagningar
  1. 48
    3
      Marlin/pins.h

+ 48
- 3
Marlin/pins.h Visa fil

260
 #ifndef Z_MS2_PIN
260
 #ifndef Z_MS2_PIN
261
   #define Z_MS2_PIN -1
261
   #define Z_MS2_PIN -1
262
 #endif
262
 #endif
263
+#ifndef E0_STEP_PIN
264
+  #define E0_STEP_PIN -1
265
+#endif
266
+#ifndef E0_DIR_PIN
267
+  #define E0_DIR_PIN -1
268
+#endif
269
+#ifndef E0_ENABLE_PIN
270
+  #define E0_ENABLE_PIN -1
271
+#endif
263
 #ifndef E0_MS1_PIN
272
 #ifndef E0_MS1_PIN
264
   #define E0_MS1_PIN -1
273
   #define E0_MS1_PIN -1
265
 #endif
274
 #endif
266
 #ifndef E0_MS2_PIN
275
 #ifndef E0_MS2_PIN
267
   #define E0_MS2_PIN -1
276
   #define E0_MS2_PIN -1
268
 #endif
277
 #endif
278
+#ifndef E1_STEP_PIN
279
+  #define E1_STEP_PIN -1
280
+#endif
281
+#ifndef E1_DIR_PIN
282
+  #define E1_DIR_PIN -1
283
+#endif
284
+#ifndef E1_ENABLE_PIN
285
+  #define E1_ENABLE_PIN -1
286
+#endif
269
 #ifndef E1_MS1_PIN
287
 #ifndef E1_MS1_PIN
270
   #define E1_MS1_PIN -1
288
   #define E1_MS1_PIN -1
271
 #endif
289
 #endif
272
 #ifndef E1_MS2_PIN
290
 #ifndef E1_MS2_PIN
273
   #define E1_MS2_PIN -1
291
   #define E1_MS2_PIN -1
274
 #endif
292
 #endif
293
+#ifndef E2_STEP_PIN
294
+  #define E2_STEP_PIN -1
295
+#endif
296
+#ifndef E2_DIR_PIN
297
+  #define E2_DIR_PIN -1
298
+#endif
299
+#ifndef E2_ENABLE_PIN
300
+  #define E2_ENABLE_PIN -1
301
+#endif
302
+#ifndef E3_STEP_PIN
303
+  #define E3_STEP_PIN -1
304
+#endif
305
+#ifndef E3_DIR_PIN
306
+  #define E3_DIR_PIN -1
307
+#endif
308
+#ifndef E3_ENABLE_PIN
309
+  #define E3_ENABLE_PIN -1
310
+#endif
311
+#ifndef E4_STEP_PIN
312
+  #define E4_STEP_PIN -1
313
+#endif
314
+#ifndef E4_DIR_PIN
315
+  #define E4_DIR_PIN -1
316
+#endif
317
+#ifndef E4_ENABLE_PIN
318
+  #define E4_ENABLE_PIN -1
319
+#endif
275
 
320
 
276
 #ifndef FAN_PIN
321
 #ifndef FAN_PIN
277
   #define FAN_PIN -1
322
   #define FAN_PIN -1
557
     #define X2_STEP_PIN   _EPIN(E_STEPPERS, STEP)
602
     #define X2_STEP_PIN   _EPIN(E_STEPPERS, STEP)
558
     #define X2_DIR_PIN    _EPIN(E_STEPPERS, DIR)
603
     #define X2_DIR_PIN    _EPIN(E_STEPPERS, DIR)
559
     #define X2_ENABLE_PIN _EPIN(E_STEPPERS, ENABLE)
604
     #define X2_ENABLE_PIN _EPIN(E_STEPPERS, ENABLE)
560
-    #if X2_ENABLE_PIN == 0
605
+    #if E_STEPPERS > 4 || !PIN_EXISTS(X2_ENABLE)
561
       #error "No E stepper plug left for X2!"
606
       #error "No E stepper plug left for X2!"
562
     #endif
607
     #endif
563
   #endif
608
   #endif
574
     #define Y2_STEP_PIN   _EPIN(Y2_E_INDEX, STEP)
619
     #define Y2_STEP_PIN   _EPIN(Y2_E_INDEX, STEP)
575
     #define Y2_DIR_PIN    _EPIN(Y2_E_INDEX, DIR)
620
     #define Y2_DIR_PIN    _EPIN(Y2_E_INDEX, DIR)
576
     #define Y2_ENABLE_PIN _EPIN(Y2_E_INDEX, ENABLE)
621
     #define Y2_ENABLE_PIN _EPIN(Y2_E_INDEX, ENABLE)
577
-    #if Y2_ENABLE_PIN == 0
622
+    #if Y2_E_INDEX > 4 || !PIN_EXISTS(Y2_ENABLE)
578
       #error "No E stepper plug left for Y2!"
623
       #error "No E stepper plug left for Y2!"
579
     #endif
624
     #endif
580
   #endif
625
   #endif
591
     #define Z2_STEP_PIN   _EPIN(Z2_E_INDEX, STEP)
636
     #define Z2_STEP_PIN   _EPIN(Z2_E_INDEX, STEP)
592
     #define Z2_DIR_PIN    _EPIN(Z2_E_INDEX, DIR)
637
     #define Z2_DIR_PIN    _EPIN(Z2_E_INDEX, DIR)
593
     #define Z2_ENABLE_PIN _EPIN(Z2_E_INDEX, ENABLE)
638
     #define Z2_ENABLE_PIN _EPIN(Z2_E_INDEX, ENABLE)
594
-    #if Z2_ENABLE_PIN == 0
639
+    #if Z2_E_INDEX > 4 || !PIN_EXISTS(Z2_ENABLE)
595
       #error "No E stepper plug left for Z2!"
640
       #error "No E stepper plug left for Z2!"
596
     #endif
641
     #endif
597
   #endif
642
   #endif

Laddar…
Avbryt
Spara