|
@@ -594,320 +594,412 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
594
|
594
|
#endif
|
595
|
595
|
|
596
|
596
|
//
|
597
|
|
-// X, Y, Z Stepper enable / disable
|
|
597
|
+// Individual stepper enable / disable macros
|
598
|
598
|
//
|
599
|
|
-#if AXIS_DRIVER_TYPE_X(L6470)
|
600
|
|
- extern L6470 stepperX;
|
601
|
|
- #define X_enable() NOOP
|
602
|
|
- #define X_disable() stepperX.free()
|
603
|
|
-#elif HAS_X_ENABLE
|
604
|
|
- #define X_enable() X_ENABLE_WRITE( X_ENABLE_ON)
|
605
|
|
- #define X_disable() X_ENABLE_WRITE(!X_ENABLE_ON)
|
606
|
|
-#else
|
607
|
|
- #define X_enable() NOOP
|
608
|
|
- #define X_disable() NOOP
|
609
|
|
-#endif
|
610
|
599
|
|
611
|
|
-#if AXIS_DRIVER_TYPE_X2(L6470)
|
612
|
|
- extern L6470 stepperX2;
|
613
|
|
- #define X2_enable() NOOP
|
614
|
|
- #define X2_disable() stepperX2.free()
|
615
|
|
-#elif HAS_X2_ENABLE
|
616
|
|
- #define X2_enable() X2_ENABLE_WRITE( X_ENABLE_ON)
|
617
|
|
- #define X2_disable() X2_ENABLE_WRITE(!X_ENABLE_ON)
|
618
|
|
-#else
|
619
|
|
- #define X2_enable() NOOP
|
620
|
|
- #define X2_disable() NOOP
|
|
600
|
+#ifndef ENABLE_STEPPER_X
|
|
601
|
+ #if HAS_X_ENABLE
|
|
602
|
+ #define ENABLE_STEPPER_X() X_ENABLE_WRITE( X_ENABLE_ON)
|
|
603
|
+ #else
|
|
604
|
+ #define ENABLE_STEPPER_X() NOOP
|
|
605
|
+ #endif
|
621
|
606
|
#endif
|
622
|
|
-
|
623
|
|
-#define enable_X() do{ X_enable(); X2_enable(); }while(0)
|
624
|
|
-#define disable_X() do{ X_disable(); X2_disable(); CBI(axis_known_position, X_AXIS); }while(0)
|
625
|
|
-
|
626
|
|
-#if AXIS_DRIVER_TYPE_Y(L6470)
|
627
|
|
- extern L6470 stepperY;
|
628
|
|
- #define Y_enable() NOOP
|
629
|
|
- #define Y_disable() stepperY.free()
|
630
|
|
-#elif HAS_Y_ENABLE
|
631
|
|
- #define Y_enable() Y_ENABLE_WRITE( Y_ENABLE_ON)
|
632
|
|
- #define Y_disable() Y_ENABLE_WRITE(!Y_ENABLE_ON)
|
633
|
|
-#else
|
634
|
|
- #define Y_enable() NOOP
|
635
|
|
- #define Y_disable() NOOP
|
|
607
|
+#ifndef DISABLE_STEPPER_X
|
|
608
|
+ #if HAS_X_ENABLE
|
|
609
|
+ #define DISABLE_STEPPER_X() X_ENABLE_WRITE(!X_ENABLE_ON)
|
|
610
|
+ #else
|
|
611
|
+ #define DISABLE_STEPPER_X() NOOP
|
|
612
|
+ #endif
|
636
|
613
|
#endif
|
637
|
614
|
|
638
|
|
-#if AXIS_DRIVER_TYPE_Y2(L6470)
|
639
|
|
- extern L6470 stepperY2;
|
640
|
|
- #define Y2_enable() NOOP
|
641
|
|
- #define Y2_disable() stepperY2.free()
|
642
|
|
-#elif HAS_Y2_ENABLE
|
643
|
|
- #define Y2_enable() Y2_ENABLE_WRITE( Y_ENABLE_ON)
|
644
|
|
- #define Y2_disable() Y2_ENABLE_WRITE(!Y_ENABLE_ON)
|
645
|
|
-#else
|
646
|
|
- #define Y2_enable() NOOP
|
647
|
|
- #define Y2_disable() NOOP
|
|
615
|
+#ifndef ENABLE_STEPPER_X2
|
|
616
|
+ #if HAS_X2_ENABLE
|
|
617
|
+ #define ENABLE_STEPPER_X2() X2_ENABLE_WRITE( X_ENABLE_ON)
|
|
618
|
+ #else
|
|
619
|
+ #define ENABLE_STEPPER_X2() NOOP
|
|
620
|
+ #endif
|
|
621
|
+#endif
|
|
622
|
+#ifndef DISABLE_STEPPER_X2
|
|
623
|
+ #if HAS_X2_ENABLE
|
|
624
|
+ #define DISABLE_STEPPER_X2() X2_ENABLE_WRITE(!X_ENABLE_ON)
|
|
625
|
+ #else
|
|
626
|
+ #define DISABLE_STEPPER_X2() NOOP
|
|
627
|
+ #endif
|
648
|
628
|
#endif
|
649
|
629
|
|
650
|
|
-#define enable_Y() do{ Y_enable(); Y2_enable(); }while(0)
|
651
|
|
-#define disable_Y() do{ Y_disable(); Y2_disable(); CBI(axis_known_position, Y_AXIS); }while(0)
|
652
|
|
-
|
653
|
|
-#if AXIS_DRIVER_TYPE_Z(L6470)
|
654
|
|
- extern L6470 stepperZ;
|
655
|
|
- #define Z_enable() NOOP
|
656
|
|
- #define Z_disable() stepperZ.free()
|
657
|
|
-#elif HAS_Z_ENABLE
|
658
|
|
- #define Z_enable() Z_ENABLE_WRITE( Z_ENABLE_ON)
|
659
|
|
- #define Z_disable() Z_ENABLE_WRITE(!Z_ENABLE_ON)
|
660
|
|
-#else
|
661
|
|
- #define Z_enable() NOOP
|
662
|
|
- #define Z_disable() NOOP
|
|
630
|
+#ifndef ENABLE_STEPPER_Y
|
|
631
|
+ #if HAS_Y_ENABLE
|
|
632
|
+ #define ENABLE_STEPPER_Y() Y_ENABLE_WRITE( Y_ENABLE_ON)
|
|
633
|
+ #else
|
|
634
|
+ #define ENABLE_STEPPER_Y() NOOP
|
|
635
|
+ #endif
|
|
636
|
+#endif
|
|
637
|
+#ifndef DISABLE_STEPPER_Y
|
|
638
|
+ #if HAS_Y_ENABLE
|
|
639
|
+ #define DISABLE_STEPPER_Y() Y_ENABLE_WRITE(!Y_ENABLE_ON)
|
|
640
|
+ #else
|
|
641
|
+ #define DISABLE_STEPPER_Y() NOOP
|
|
642
|
+ #endif
|
663
|
643
|
#endif
|
664
|
644
|
|
665
|
|
-#if AXIS_DRIVER_TYPE_Z2(L6470)
|
666
|
|
- extern L6470 stepperZ2;
|
667
|
|
- #define Z2_enable() NOOP
|
668
|
|
- #define Z2_disable() stepperZ2.free()
|
669
|
|
-#elif HAS_Z2_ENABLE
|
670
|
|
- #define Z2_enable() Z2_ENABLE_WRITE( Z_ENABLE_ON)
|
671
|
|
- #define Z2_disable() Z2_ENABLE_WRITE(!Z_ENABLE_ON)
|
672
|
|
-#else
|
673
|
|
- #define Z2_enable() NOOP
|
674
|
|
- #define Z2_disable() NOOP
|
|
645
|
+#ifndef ENABLE_STEPPER_Y2
|
|
646
|
+ #if HAS_Y2_ENABLE
|
|
647
|
+ #define ENABLE_STEPPER_Y2() Y2_ENABLE_WRITE( Y_ENABLE_ON)
|
|
648
|
+ #else
|
|
649
|
+ #define ENABLE_STEPPER_Y2() NOOP
|
|
650
|
+ #endif
|
|
651
|
+#endif
|
|
652
|
+#ifndef DISABLE_STEPPER_Y2
|
|
653
|
+ #if HAS_Y2_ENABLE
|
|
654
|
+ #define DISABLE_STEPPER_Y2() Y2_ENABLE_WRITE(!Y_ENABLE_ON)
|
|
655
|
+ #else
|
|
656
|
+ #define DISABLE_STEPPER_Y2() NOOP
|
|
657
|
+ #endif
|
675
|
658
|
#endif
|
676
|
659
|
|
677
|
|
-#if AXIS_DRIVER_TYPE_Z3(L6470)
|
678
|
|
- extern L6470 stepperZ3;
|
679
|
|
- #define Z3_enable() NOOP
|
680
|
|
- #define Z3_disable() stepperZ3.free()
|
681
|
|
-#elif HAS_Z3_ENABLE
|
682
|
|
- #define Z3_enable() Z3_ENABLE_WRITE( Z_ENABLE_ON)
|
683
|
|
- #define Z3_disable() Z3_ENABLE_WRITE(!Z_ENABLE_ON)
|
684
|
|
-#else
|
685
|
|
- #define Z3_enable() NOOP
|
686
|
|
- #define Z3_disable() NOOP
|
|
660
|
+#ifndef ENABLE_STEPPER_Z
|
|
661
|
+ #if HAS_Z_ENABLE
|
|
662
|
+ #define ENABLE_STEPPER_Z() Z_ENABLE_WRITE( Z_ENABLE_ON)
|
|
663
|
+ #else
|
|
664
|
+ #define ENABLE_STEPPER_Z() NOOP
|
|
665
|
+ #endif
|
|
666
|
+#endif
|
|
667
|
+#ifndef DISABLE_STEPPER_Z
|
|
668
|
+ #if HAS_Z_ENABLE
|
|
669
|
+ #define DISABLE_STEPPER_Z() Z_ENABLE_WRITE(!Z_ENABLE_ON)
|
|
670
|
+ #else
|
|
671
|
+ #define DISABLE_STEPPER_Z() NOOP
|
|
672
|
+ #endif
|
687
|
673
|
#endif
|
688
|
674
|
|
689
|
|
-#if AXIS_DRIVER_TYPE_Z4(L6470)
|
690
|
|
- extern L6470 stepperZ4;
|
691
|
|
- #define Z4_enable() NOOP
|
692
|
|
- #define Z4_disable() stepperZ4.free()
|
693
|
|
-#elif HAS_Z4_ENABLE
|
694
|
|
- #define Z4_enable() Z4_ENABLE_WRITE( Z_ENABLE_ON)
|
695
|
|
- #define Z4_disable() Z4_ENABLE_WRITE(!Z_ENABLE_ON)
|
696
|
|
-#else
|
697
|
|
- #define Z4_enable() NOOP
|
698
|
|
- #define Z4_disable() NOOP
|
|
675
|
+#ifndef ENABLE_STEPPER_Z2
|
|
676
|
+ #if HAS_Z2_ENABLE
|
|
677
|
+ #define ENABLE_STEPPER_Z2() Z2_ENABLE_WRITE( Z_ENABLE_ON)
|
|
678
|
+ #else
|
|
679
|
+ #define ENABLE_STEPPER_Z2() NOOP
|
|
680
|
+ #endif
|
|
681
|
+#endif
|
|
682
|
+#ifndef DISABLE_STEPPER_Z2
|
|
683
|
+ #if HAS_Z2_ENABLE
|
|
684
|
+ #define DISABLE_STEPPER_Z2() Z2_ENABLE_WRITE(!Z_ENABLE_ON)
|
|
685
|
+ #else
|
|
686
|
+ #define DISABLE_STEPPER_Z2() NOOP
|
|
687
|
+ #endif
|
699
|
688
|
#endif
|
700
|
689
|
|
701
|
|
-#define enable_Z() do{ Z_enable(); Z2_enable(); Z3_enable(); Z4_enable(); }while(0)
|
702
|
|
-#define disable_Z() do{ Z_disable(); Z2_disable(); Z3_disable(); Z4_disable(); CBI(axis_known_position, Z_AXIS); }while(0)
|
|
690
|
+#ifndef ENABLE_STEPPER_Z3
|
|
691
|
+ #if HAS_Z3_ENABLE
|
|
692
|
+ #define ENABLE_STEPPER_Z3() Z3_ENABLE_WRITE( Z_ENABLE_ON)
|
|
693
|
+ #else
|
|
694
|
+ #define ENABLE_STEPPER_Z3() NOOP
|
|
695
|
+ #endif
|
|
696
|
+#endif
|
|
697
|
+#ifndef DISABLE_STEPPER_Z3
|
|
698
|
+ #if HAS_Z3_ENABLE
|
|
699
|
+ #define DISABLE_STEPPER_Z3() Z3_ENABLE_WRITE(!Z_ENABLE_ON)
|
|
700
|
+ #else
|
|
701
|
+ #define DISABLE_STEPPER_Z3() NOOP
|
|
702
|
+ #endif
|
|
703
|
+#endif
|
703
|
704
|
|
704
|
|
-//
|
705
|
|
-// Extruder Stepper enable / disable
|
706
|
|
-//
|
|
705
|
+#ifndef ENABLE_STEPPER_Z4
|
|
706
|
+ #if HAS_Z4_ENABLE
|
|
707
|
+ #define ENABLE_STEPPER_Z4() Z4_ENABLE_WRITE( Z_ENABLE_ON)
|
|
708
|
+ #else
|
|
709
|
+ #define ENABLE_STEPPER_Z4() NOOP
|
|
710
|
+ #endif
|
|
711
|
+#endif
|
|
712
|
+#ifndef DISABLE_STEPPER_Z4
|
|
713
|
+ #if HAS_Z4_ENABLE
|
|
714
|
+ #define DISABLE_STEPPER_Z4() Z4_ENABLE_WRITE(!Z_ENABLE_ON)
|
|
715
|
+ #else
|
|
716
|
+ #define DISABLE_STEPPER_Z4() NOOP
|
|
717
|
+ #endif
|
|
718
|
+#endif
|
707
|
719
|
|
708
|
|
-// define the individual enables/disables
|
709
|
|
-#if AXIS_DRIVER_TYPE_E0(L6470)
|
710
|
|
- extern L6470 stepperE0;
|
711
|
|
- #define E0_enable() NOOP
|
712
|
|
- #define E0_disable() do{ stepperE0.free(); CBI(axis_known_position, E_AXIS); }while(0)
|
713
|
|
-#elif HAS_E0_ENABLE
|
714
|
|
- #define E0_enable() E0_ENABLE_WRITE( E_ENABLE_ON)
|
715
|
|
- #define E0_disable() E0_ENABLE_WRITE(!E_ENABLE_ON)
|
716
|
|
-#else
|
717
|
|
- #define E0_enable() NOOP
|
718
|
|
- #define E0_disable() NOOP
|
|
720
|
+#ifndef ENABLE_STEPPER_E0
|
|
721
|
+ #if HAS_E0_ENABLE
|
|
722
|
+ #define ENABLE_STEPPER_E0() E0_ENABLE_WRITE( E_ENABLE_ON)
|
|
723
|
+ #else
|
|
724
|
+ #define ENABLE_STEPPER_E0() NOOP
|
|
725
|
+ #endif
|
|
726
|
+#endif
|
|
727
|
+#ifndef DISABLE_STEPPER_E0
|
|
728
|
+ #if HAS_E0_ENABLE
|
|
729
|
+ #define DISABLE_STEPPER_E0() E0_ENABLE_WRITE(!E_ENABLE_ON)
|
|
730
|
+ #else
|
|
731
|
+ #define DISABLE_STEPPER_E0() NOOP
|
|
732
|
+ #endif
|
719
|
733
|
#endif
|
720
|
734
|
|
721
|
|
-#if AXIS_DRIVER_TYPE_E1(L6470)
|
722
|
|
- extern L6470 stepperE1;
|
723
|
|
- #define E1_enable() NOOP
|
724
|
|
- #define E1_disable() do{ stepperE1.free(); CBI(axis_known_position, E_AXIS); }while(0)
|
725
|
|
-#elif E_STEPPERS > 1 && HAS_E1_ENABLE
|
726
|
|
- #define E1_enable() E1_ENABLE_WRITE( E_ENABLE_ON)
|
727
|
|
- #define E1_disable() E1_ENABLE_WRITE(!E_ENABLE_ON)
|
728
|
|
-#else
|
729
|
|
- #define E1_enable() NOOP
|
730
|
|
- #define E1_disable() NOOP
|
|
735
|
+#ifndef ENABLE_STEPPER_E1
|
|
736
|
+ #if E_STEPPERS > 1 && HAS_E1_ENABLE
|
|
737
|
+ #define ENABLE_STEPPER_E1() E1_ENABLE_WRITE( E_ENABLE_ON)
|
|
738
|
+ #else
|
|
739
|
+ #define ENABLE_STEPPER_E1() NOOP
|
|
740
|
+ #endif
|
|
741
|
+#endif
|
|
742
|
+#ifndef DISABLE_STEPPER_E1
|
|
743
|
+ #if E_STEPPERS > 1 && HAS_E1_ENABLE
|
|
744
|
+ #define DISABLE_STEPPER_E1() E1_ENABLE_WRITE(!E_ENABLE_ON)
|
|
745
|
+ #else
|
|
746
|
+ #define DISABLE_STEPPER_E1() NOOP
|
|
747
|
+ #endif
|
731
|
748
|
#endif
|
732
|
749
|
|
733
|
|
-#if AXIS_DRIVER_TYPE_E2(L6470)
|
734
|
|
- extern L6470 stepperE2;
|
735
|
|
- #define E2_enable() NOOP
|
736
|
|
- #define E2_disable() do{ stepperE2.free(); CBI(axis_known_position, E_AXIS); }while(0)
|
737
|
|
-#elif E_STEPPERS > 2 && HAS_E2_ENABLE
|
738
|
|
- #define E2_enable() E2_ENABLE_WRITE( E_ENABLE_ON)
|
739
|
|
- #define E2_disable() E2_ENABLE_WRITE(!E_ENABLE_ON)
|
740
|
|
-#else
|
741
|
|
- #define E2_enable() NOOP
|
742
|
|
- #define E2_disable() NOOP
|
|
750
|
+#ifndef ENABLE_STEPPER_E2
|
|
751
|
+ #if E_STEPPERS > 2 && HAS_E2_ENABLE
|
|
752
|
+ #define ENABLE_STEPPER_E2() E2_ENABLE_WRITE( E_ENABLE_ON)
|
|
753
|
+ #else
|
|
754
|
+ #define ENABLE_STEPPER_E2() NOOP
|
|
755
|
+ #endif
|
|
756
|
+#endif
|
|
757
|
+#ifndef DISABLE_STEPPER_E2
|
|
758
|
+ #if E_STEPPERS > 2 && HAS_E2_ENABLE
|
|
759
|
+ #define DISABLE_STEPPER_E2() E2_ENABLE_WRITE(!E_ENABLE_ON)
|
|
760
|
+ #else
|
|
761
|
+ #define DISABLE_STEPPER_E2() NOOP
|
|
762
|
+ #endif
|
743
|
763
|
#endif
|
744
|
764
|
|
745
|
|
-#if AXIS_DRIVER_TYPE_E3(L6470)
|
746
|
|
- extern L6470 stepperE3;
|
747
|
|
- #define E3_enable() NOOP
|
748
|
|
- #define E3_disable() do{ stepperE3.free(); CBI(axis_known_position, E_AXIS); }while(0)
|
749
|
|
-#elif E_STEPPERS > 3 && HAS_E3_ENABLE
|
750
|
|
- #define E3_enable() E3_ENABLE_WRITE( E_ENABLE_ON)
|
751
|
|
- #define E3_disable() E3_ENABLE_WRITE(!E_ENABLE_ON)
|
752
|
|
-#else
|
753
|
|
- #define E3_enable() NOOP
|
754
|
|
- #define E3_disable() NOOP
|
|
765
|
+#ifndef ENABLE_STEPPER_E3
|
|
766
|
+ #if E_STEPPERS > 3 && HAS_E3_ENABLE
|
|
767
|
+ #define ENABLE_STEPPER_E3() E3_ENABLE_WRITE( E_ENABLE_ON)
|
|
768
|
+ #else
|
|
769
|
+ #define ENABLE_STEPPER_E3() NOOP
|
|
770
|
+ #endif
|
|
771
|
+#endif
|
|
772
|
+#ifndef DISABLE_STEPPER_E3
|
|
773
|
+ #if E_STEPPERS > 3 && HAS_E3_ENABLE
|
|
774
|
+ #define DISABLE_STEPPER_E3() E3_ENABLE_WRITE(!E_ENABLE_ON)
|
|
775
|
+ #else
|
|
776
|
+ #define DISABLE_STEPPER_E3() NOOP
|
|
777
|
+ #endif
|
755
|
778
|
#endif
|
756
|
779
|
|
757
|
|
-#if AXIS_DRIVER_TYPE_E4(L6470)
|
758
|
|
- extern L6470 stepperE4;
|
759
|
|
- #define E4_enable() NOOP
|
760
|
|
- #define E4_disable() do{ stepperE4.free(); CBI(axis_known_position, E_AXIS); }while(0)
|
761
|
|
-#elif E_STEPPERS > 4 && HAS_E4_ENABLE
|
762
|
|
- #define E4_enable() E4_ENABLE_WRITE( E_ENABLE_ON)
|
763
|
|
- #define E4_disable() E4_ENABLE_WRITE(!E_ENABLE_ON)
|
764
|
|
-#else
|
765
|
|
- #define E4_enable() NOOP
|
766
|
|
- #define E4_disable() NOOP
|
|
780
|
+#ifndef ENABLE_STEPPER_E4
|
|
781
|
+ #if E_STEPPERS > 4 && HAS_E4_ENABLE
|
|
782
|
+ #define ENABLE_STEPPER_E4() E4_ENABLE_WRITE( E_ENABLE_ON)
|
|
783
|
+ #else
|
|
784
|
+ #define ENABLE_STEPPER_E4() NOOP
|
|
785
|
+ #endif
|
|
786
|
+#endif
|
|
787
|
+#ifndef DISABLE_STEPPER_E4
|
|
788
|
+ #if E_STEPPERS > 4 && HAS_E4_ENABLE
|
|
789
|
+ #define DISABLE_STEPPER_E4() E4_ENABLE_WRITE(!E_ENABLE_ON)
|
|
790
|
+ #else
|
|
791
|
+ #define DISABLE_STEPPER_E4() NOOP
|
|
792
|
+ #endif
|
767
|
793
|
#endif
|
768
|
794
|
|
769
|
|
-#if AXIS_DRIVER_TYPE_E5(L6470)
|
770
|
|
- extern L6470 stepperE5;
|
771
|
|
- #define E5_enable() NOOP
|
772
|
|
- #define E5_disable() do{ stepperE5.free(); CBI(axis_known_position, E_AXIS); }while(0)
|
773
|
|
-#elif E_STEPPERS > 5 && HAS_E5_ENABLE
|
774
|
|
- #define E5_enable() E5_ENABLE_WRITE( E_ENABLE_ON)
|
775
|
|
- #define E5_disable() E5_ENABLE_WRITE(!E_ENABLE_ON)
|
776
|
|
-#else
|
777
|
|
- #define E5_enable() NOOP
|
778
|
|
- #define E5_disable() NOOP
|
|
795
|
+#ifndef ENABLE_STEPPER_E5
|
|
796
|
+ #if E_STEPPERS > 5 && HAS_E5_ENABLE
|
|
797
|
+ #define ENABLE_STEPPER_E5() E5_ENABLE_WRITE( E_ENABLE_ON)
|
|
798
|
+ #else
|
|
799
|
+ #define ENABLE_STEPPER_E5() NOOP
|
|
800
|
+ #endif
|
|
801
|
+#endif
|
|
802
|
+#ifndef DISABLE_STEPPER_E5
|
|
803
|
+ #if E_STEPPERS > 5 && HAS_E5_ENABLE
|
|
804
|
+ #define DISABLE_STEPPER_E5() E5_ENABLE_WRITE(!E_ENABLE_ON)
|
|
805
|
+ #else
|
|
806
|
+ #define DISABLE_STEPPER_E5() NOOP
|
|
807
|
+ #endif
|
779
|
808
|
#endif
|
780
|
809
|
|
781
|
|
-#if AXIS_DRIVER_TYPE_E6(L6470)
|
782
|
|
- extern L6470 stepperE6;
|
783
|
|
- #define E6_enable() NOOP
|
784
|
|
- #define E6_disable() do{ stepperE6.free(); CBI(axis_known_position, E_AXIS); }while(0)
|
785
|
|
-#elif E_STEPPERS > 6 && HAS_E6_ENABLE
|
786
|
|
- #define E6_enable() E6_ENABLE_WRITE( E_ENABLE_ON)
|
787
|
|
- #define E6_disable() E6_ENABLE_WRITE(!E_ENABLE_ON)
|
788
|
|
-#else
|
789
|
|
- #define E6_enable() NOOP
|
790
|
|
- #define E6_disable() NOOP
|
|
810
|
+#ifndef ENABLE_STEPPER_E6
|
|
811
|
+ #if E_STEPPERS > 6 && HAS_E6_ENABLE
|
|
812
|
+ #define ENABLE_STEPPER_E6() E6_ENABLE_WRITE( E_ENABLE_ON)
|
|
813
|
+ #else
|
|
814
|
+ #define ENABLE_STEPPER_E6() NOOP
|
|
815
|
+ #endif
|
|
816
|
+#endif
|
|
817
|
+#ifndef DISABLE_STEPPER_E6
|
|
818
|
+ #if E_STEPPERS > 6 && HAS_E6_ENABLE
|
|
819
|
+ #define DISABLE_STEPPER_E6() E6_ENABLE_WRITE(!E_ENABLE_ON)
|
|
820
|
+ #else
|
|
821
|
+ #define DISABLE_STEPPER_E6() NOOP
|
|
822
|
+ #endif
|
791
|
823
|
#endif
|
792
|
824
|
|
793
|
|
-#if AXIS_DRIVER_TYPE_E7(L6470)
|
794
|
|
- extern L6470 stepperE7;
|
795
|
|
- #define E7_enable() NOOP
|
796
|
|
- #define E7_disable() do{ stepperE7.free(); CBI(axis_known_position, E_AXIS); }while(0)
|
797
|
|
-#elif E_STEPPERS > 7 && HAS_E7_ENABLE
|
798
|
|
- #define E7_enable() E7_ENABLE_WRITE( E_ENABLE_ON)
|
799
|
|
- #define E7_disable() E7_ENABLE_WRITE(!E_ENABLE_ON)
|
800
|
|
-#else
|
801
|
|
- #define E7_enable() NOOP
|
802
|
|
- #define E7_disable() NOOP
|
|
825
|
+#ifndef ENABLE_STEPPER_E7
|
|
826
|
+ #if E_STEPPERS > 7 && HAS_E7_ENABLE
|
|
827
|
+ #define ENABLE_STEPPER_E7() E7_ENABLE_WRITE( E_ENABLE_ON)
|
|
828
|
+ #else
|
|
829
|
+ #define ENABLE_STEPPER_E7() NOOP
|
|
830
|
+ #endif
|
803
|
831
|
#endif
|
|
832
|
+#ifndef DISABLE_STEPPER_E7
|
|
833
|
+ #if E_STEPPERS > 7 && HAS_E7_ENABLE
|
|
834
|
+ #define DISABLE_STEPPER_E7() E7_ENABLE_WRITE(!E_ENABLE_ON)
|
|
835
|
+ #else
|
|
836
|
+ #define DISABLE_STEPPER_E7() NOOP
|
|
837
|
+ #endif
|
|
838
|
+#endif
|
|
839
|
+
|
|
840
|
+//
|
|
841
|
+// Axis steppers enable / disable macros
|
|
842
|
+//
|
|
843
|
+
|
|
844
|
+#define ENABLE_AXIS_X() do{ ENABLE_STEPPER_X(); ENABLE_STEPPER_X2(); }while(0)
|
|
845
|
+#define DISABLE_AXIS_X() do{ DISABLE_STEPPER_X(); DISABLE_STEPPER_X2(); CBI(axis_known_position, X_AXIS); }while(0)
|
|
846
|
+
|
|
847
|
+#define ENABLE_AXIS_Y() do{ ENABLE_STEPPER_Y(); ENABLE_STEPPER_Y2(); }while(0)
|
|
848
|
+#define DISABLE_AXIS_Y() do{ DISABLE_STEPPER_Y(); DISABLE_STEPPER_Y2(); CBI(axis_known_position, Y_AXIS); }while(0)
|
|
849
|
+
|
|
850
|
+#define ENABLE_AXIS_Z() do{ ENABLE_STEPPER_Z(); ENABLE_STEPPER_Z2(); ENABLE_STEPPER_Z3(); ENABLE_STEPPER_Z4(); }while(0)
|
|
851
|
+#define DISABLE_AXIS_Z() do{ DISABLE_STEPPER_Z(); DISABLE_STEPPER_Z2(); DISABLE_STEPPER_Z3(); DISABLE_STEPPER_Z4(); CBI(axis_known_position, Z_AXIS); }while(0)
|
|
852
|
+
|
|
853
|
+//
|
|
854
|
+// Extruder steppers enable / disable macros
|
|
855
|
+//
|
804
|
856
|
|
805
|
857
|
#if ENABLED(MIXING_EXTRUDER)
|
806
|
858
|
|
807
|
859
|
/**
|
808
|
|
- * Mixing steppers synchronize their enable (and direction) together
|
|
860
|
+ * Mixing steppers keep all their enable (and direction) states synchronized
|
809
|
861
|
*/
|
810
|
862
|
#if MIXING_STEPPERS > 7
|
811
|
|
- #define enable_E0() { E0_enable(); E1_enable(); E2_enable(); E3_enable(); E4_enable(); E5_enable(); E6_enable(); E7_enable(); }
|
812
|
|
- #define disable_E0() { E0_disable(); E1_disable(); E2_disable(); E3_disable(); E4_disable(); E5_disable(); E6_disable(); E7_disable(); }
|
|
863
|
+ #define ENABLE_AXIS_E0() { ENABLE_STEPPER_E0(); ENABLE_STEPPER_E1(); ENABLE_STEPPER_E2(); ENABLE_STEPPER_E3(); ENABLE_STEPPER_E4(); ENABLE_STEPPER_E5(); ENABLE_STEPPER_E6(); ENABLE_STEPPER_E7(); }
|
|
864
|
+ #define DISABLE_AXIS_E0() { DISABLE_STEPPER_E0(); DISABLE_STEPPER_E1(); DISABLE_STEPPER_E2(); DISABLE_STEPPER_E3(); DISABLE_STEPPER_E4(); DISABLE_STEPPER_E5(); DISABLE_STEPPER_E6(); DISABLE_STEPPER_E7(); }
|
813
|
865
|
#elif MIXING_STEPPERS > 6
|
814
|
|
- #define enable_E0() { E0_enable(); E1_enable(); E2_enable(); E3_enable(); E4_enable(); E5_enable(); E6_enable(); }
|
815
|
|
- #define disable_E0() { E0_disable(); E1_disable(); E2_disable(); E3_disable(); E4_disable(); E5_disable(); E6_disable(); }
|
|
866
|
+ #define ENABLE_AXIS_E0() { ENABLE_STEPPER_E0(); ENABLE_STEPPER_E1(); ENABLE_STEPPER_E2(); ENABLE_STEPPER_E3(); ENABLE_STEPPER_E4(); ENABLE_STEPPER_E5(); ENABLE_STEPPER_E6(); }
|
|
867
|
+ #define DISABLE_AXIS_E0() { DISABLE_STEPPER_E0(); DISABLE_STEPPER_E1(); DISABLE_STEPPER_E2(); DISABLE_STEPPER_E3(); DISABLE_STEPPER_E4(); DISABLE_STEPPER_E5(); DISABLE_STEPPER_E6(); }
|
816
|
868
|
#elif MIXING_STEPPERS > 5
|
817
|
|
- #define enable_E0() { E0_enable(); E1_enable(); E2_enable(); E3_enable(); E4_enable(); E5_enable(); }
|
818
|
|
- #define disable_E0() { E0_disable(); E1_disable(); E2_disable(); E3_disable(); E4_disable(); E5_disable(); }
|
|
869
|
+ #define ENABLE_AXIS_E0() { ENABLE_STEPPER_E0(); ENABLE_STEPPER_E1(); ENABLE_STEPPER_E2(); ENABLE_STEPPER_E3(); ENABLE_STEPPER_E4(); ENABLE_STEPPER_E5(); }
|
|
870
|
+ #define DISABLE_AXIS_E0() { DISABLE_STEPPER_E0(); DISABLE_STEPPER_E1(); DISABLE_STEPPER_E2(); DISABLE_STEPPER_E3(); DISABLE_STEPPER_E4(); DISABLE_STEPPER_E5(); }
|
819
|
871
|
#elif MIXING_STEPPERS > 4
|
820
|
|
- #define enable_E0() { E0_enable(); E1_enable(); E2_enable(); E3_enable(); E4_enable(); }
|
821
|
|
- #define disable_E0() { E0_disable(); E1_disable(); E2_disable(); E3_disable(); E4_disable(); }
|
|
872
|
+ #define ENABLE_AXIS_E0() { ENABLE_STEPPER_E0(); ENABLE_STEPPER_E1(); ENABLE_STEPPER_E2(); ENABLE_STEPPER_E3(); ENABLE_STEPPER_E4(); }
|
|
873
|
+ #define DISABLE_AXIS_E0() { DISABLE_STEPPER_E0(); DISABLE_STEPPER_E1(); DISABLE_STEPPER_E2(); DISABLE_STEPPER_E3(); DISABLE_STEPPER_E4(); }
|
822
|
874
|
#elif MIXING_STEPPERS > 3
|
823
|
|
- #define enable_E0() { E0_enable(); E1_enable(); E2_enable(); E3_enable(); }
|
824
|
|
- #define disable_E0() { E0_disable(); E1_disable(); E2_disable(); E3_disable(); }
|
|
875
|
+ #define ENABLE_AXIS_E0() { ENABLE_STEPPER_E0(); ENABLE_STEPPER_E1(); ENABLE_STEPPER_E2(); ENABLE_STEPPER_E3(); }
|
|
876
|
+ #define DISABLE_AXIS_E0() { DISABLE_STEPPER_E0(); DISABLE_STEPPER_E1(); DISABLE_STEPPER_E2(); DISABLE_STEPPER_E3(); }
|
825
|
877
|
#elif MIXING_STEPPERS > 2
|
826
|
|
- #define enable_E0() { E0_enable(); E1_enable(); E2_enable(); }
|
827
|
|
- #define disable_E0() { E0_disable(); E1_disable(); E2_disable(); }
|
828
|
|
- #else
|
829
|
|
- #define enable_E0() { E0_enable(); E1_enable(); }
|
830
|
|
- #define disable_E0() { E0_disable(); E1_disable(); }
|
831
|
|
- #endif
|
832
|
|
- #define enable_E1() NOOP
|
833
|
|
- #define disable_E1() NOOP
|
834
|
|
- #define enable_E2() NOOP
|
835
|
|
- #define disable_E2() NOOP
|
836
|
|
- #define enable_E3() NOOP
|
837
|
|
- #define disable_E3() NOOP
|
838
|
|
- #define enable_E4() NOOP
|
839
|
|
- #define disable_E4() NOOP
|
840
|
|
- #define enable_E5() NOOP
|
841
|
|
- #define disable_E5() NOOP
|
842
|
|
- #define enable_E6() NOOP
|
843
|
|
- #define disable_E6() NOOP
|
844
|
|
- #define enable_E7() NOOP
|
845
|
|
- #define disable_E7() NOOP
|
846
|
|
-
|
847
|
|
-#else // !MIXING_EXTRUDER
|
|
878
|
+ #define ENABLE_AXIS_E0() { ENABLE_STEPPER_E0(); ENABLE_STEPPER_E1(); ENABLE_STEPPER_E2(); }
|
|
879
|
+ #define DISABLE_AXIS_E0() { DISABLE_STEPPER_E0(); DISABLE_STEPPER_E1(); DISABLE_STEPPER_E2(); }
|
|
880
|
+ #else
|
|
881
|
+ #define ENABLE_AXIS_E0() { ENABLE_STEPPER_E0(); ENABLE_STEPPER_E1(); }
|
|
882
|
+ #define DISABLE_AXIS_E0() { DISABLE_STEPPER_E0(); DISABLE_STEPPER_E1(); }
|
|
883
|
+ #endif
|
848
|
884
|
|
849
|
|
- #if HAS_E0_ENABLE
|
850
|
|
- #define enable_E0() E0_enable()
|
851
|
|
- #define disable_E0() E0_disable()
|
|
885
|
+#endif // !MIXING_EXTRUDER
|
|
886
|
+
|
|
887
|
+#ifndef ENABLE_AXIS_E0
|
|
888
|
+ #if E_STEPPERS > 0 && HAS_E0_ENABLE
|
|
889
|
+ #define ENABLE_AXIS_E0() ENABLE_STEPPER_E0()
|
852
|
890
|
#else
|
853
|
|
- #define enable_E0() NOOP
|
854
|
|
- #define disable_E0() NOOP
|
|
891
|
+ #define ENABLE_AXIS_E0() NOOP
|
855
|
892
|
#endif
|
|
893
|
+#endif
|
|
894
|
+#ifndef DISABLE_AXIS_E0
|
|
895
|
+ #if E_STEPPERS > 0 && HAS_E0_DISABLE
|
|
896
|
+ #define DISABLE_AXIS_E0() DISABLE_STEPPER_E0()
|
|
897
|
+ #else
|
|
898
|
+ #define DISABLE_AXIS_E0() NOOP
|
|
899
|
+ #endif
|
|
900
|
+#endif
|
856
|
901
|
|
|
902
|
+#ifndef ENABLE_AXIS_E1
|
857
|
903
|
#if E_STEPPERS > 1 && HAS_E1_ENABLE
|
858
|
|
- #define enable_E1() E1_enable()
|
859
|
|
- #define disable_E1() E1_disable()
|
|
904
|
+ #define ENABLE_AXIS_E1() ENABLE_STEPPER_E1()
|
860
|
905
|
#else
|
861
|
|
- #define enable_E1() NOOP
|
862
|
|
- #define disable_E1() NOOP
|
|
906
|
+ #define ENABLE_AXIS_E1() NOOP
|
863
|
907
|
#endif
|
|
908
|
+#endif
|
|
909
|
+#ifndef DISABLE_AXIS_E1
|
|
910
|
+ #if E_STEPPERS > 1 && HAS_E1_DISABLE
|
|
911
|
+ #define DISABLE_AXIS_E1() DISABLE_STEPPER_E1()
|
|
912
|
+ #else
|
|
913
|
+ #define DISABLE_AXIS_E1() NOOP
|
|
914
|
+ #endif
|
|
915
|
+#endif
|
864
|
916
|
|
|
917
|
+#ifndef ENABLE_AXIS_E2
|
865
|
918
|
#if E_STEPPERS > 2 && HAS_E2_ENABLE
|
866
|
|
- #define enable_E2() E2_enable()
|
867
|
|
- #define disable_E2() E2_disable()
|
|
919
|
+ #define ENABLE_AXIS_E2() ENABLE_STEPPER_E2()
|
|
920
|
+ #else
|
|
921
|
+ #define ENABLE_AXIS_E2() NOOP
|
|
922
|
+ #endif
|
|
923
|
+#endif
|
|
924
|
+#ifndef DISABLE_AXIS_E2
|
|
925
|
+ #if E_STEPPERS > 2 && HAS_E2_DISABLE
|
|
926
|
+ #define DISABLE_AXIS_E2() DISABLE_STEPPER_E2()
|
868
|
927
|
#else
|
869
|
|
- #define enable_E2() NOOP
|
870
|
|
- #define disable_E2() NOOP
|
|
928
|
+ #define DISABLE_AXIS_E2() NOOP
|
871
|
929
|
#endif
|
|
930
|
+#endif
|
872
|
931
|
|
|
932
|
+#ifndef ENABLE_AXIS_E3
|
873
|
933
|
#if E_STEPPERS > 3 && HAS_E3_ENABLE
|
874
|
|
- #define enable_E3() E3_enable()
|
875
|
|
- #define disable_E3() E3_disable()
|
|
934
|
+ #define ENABLE_AXIS_E3() ENABLE_STEPPER_E3()
|
876
|
935
|
#else
|
877
|
|
- #define enable_E3() NOOP
|
878
|
|
- #define disable_E3() NOOP
|
|
936
|
+ #define ENABLE_AXIS_E3() NOOP
|
879
|
937
|
#endif
|
|
938
|
+#endif
|
|
939
|
+#ifndef DISABLE_AXIS_E3
|
|
940
|
+ #if E_STEPPERS > 3 && HAS_E3_DISABLE
|
|
941
|
+ #define DISABLE_AXIS_E3() DISABLE_STEPPER_E3()
|
|
942
|
+ #else
|
|
943
|
+ #define DISABLE_AXIS_E3() NOOP
|
|
944
|
+ #endif
|
|
945
|
+#endif
|
880
|
946
|
|
|
947
|
+#ifndef ENABLE_AXIS_E4
|
881
|
948
|
#if E_STEPPERS > 4 && HAS_E4_ENABLE
|
882
|
|
- #define enable_E4() E4_enable()
|
883
|
|
- #define disable_E4() E4_disable()
|
|
949
|
+ #define ENABLE_AXIS_E4() ENABLE_STEPPER_E4()
|
|
950
|
+ #else
|
|
951
|
+ #define ENABLE_AXIS_E4() NOOP
|
|
952
|
+ #endif
|
|
953
|
+#endif
|
|
954
|
+#ifndef DISABLE_AXIS_E4
|
|
955
|
+ #if E_STEPPERS > 4 && HAS_E4_DISABLE
|
|
956
|
+ #define DISABLE_AXIS_E4() DISABLE_STEPPER_E4()
|
884
|
957
|
#else
|
885
|
|
- #define enable_E4() NOOP
|
886
|
|
- #define disable_E4() NOOP
|
|
958
|
+ #define DISABLE_AXIS_E4() NOOP
|
887
|
959
|
#endif
|
|
960
|
+#endif
|
888
|
961
|
|
|
962
|
+#ifndef ENABLE_AXIS_E5
|
889
|
963
|
#if E_STEPPERS > 5 && HAS_E5_ENABLE
|
890
|
|
- #define enable_E5() E5_enable()
|
891
|
|
- #define disable_E5() E5_disable()
|
|
964
|
+ #define ENABLE_AXIS_E5() ENABLE_STEPPER_E5()
|
892
|
965
|
#else
|
893
|
|
- #define enable_E5() NOOP
|
894
|
|
- #define disable_E5() NOOP
|
|
966
|
+ #define ENABLE_AXIS_E5() NOOP
|
895
|
967
|
#endif
|
|
968
|
+#endif
|
|
969
|
+#ifndef DISABLE_AXIS_E5
|
|
970
|
+ #if E_STEPPERS > 5 && HAS_E5_DISABLE
|
|
971
|
+ #define DISABLE_AXIS_E5() DISABLE_STEPPER_E5()
|
|
972
|
+ #else
|
|
973
|
+ #define DISABLE_AXIS_E5() NOOP
|
|
974
|
+ #endif
|
|
975
|
+#endif
|
896
|
976
|
|
|
977
|
+#ifndef ENABLE_AXIS_E6
|
897
|
978
|
#if E_STEPPERS > 6 && HAS_E6_ENABLE
|
898
|
|
- #define enable_E6() E6_enable()
|
899
|
|
- #define disable_E6() E6_disable()
|
|
979
|
+ #define ENABLE_AXIS_E6() ENABLE_STEPPER_E6()
|
900
|
980
|
#else
|
901
|
|
- #define enable_E6() NOOP
|
902
|
|
- #define disable_E6() NOOP
|
|
981
|
+ #define ENABLE_AXIS_E6() NOOP
|
903
|
982
|
#endif
|
|
983
|
+#endif
|
|
984
|
+#ifndef DISABLE_AXIS_E6
|
|
985
|
+ #if E_STEPPERS > 6 && HAS_E6_DISABLE
|
|
986
|
+ #define DISABLE_AXIS_E6() DISABLE_STEPPER_E6()
|
|
987
|
+ #else
|
|
988
|
+ #define DISABLE_AXIS_E6() NOOP
|
|
989
|
+ #endif
|
|
990
|
+#endif
|
904
|
991
|
|
|
992
|
+#ifndef ENABLE_AXIS_E7
|
905
|
993
|
#if E_STEPPERS > 7 && HAS_E7_ENABLE
|
906
|
|
- #define enable_E7() E7_enable()
|
907
|
|
- #define disable_E7() E7_disable()
|
|
994
|
+ #define ENABLE_AXIS_E7() ENABLE_STEPPER_E7()
|
908
|
995
|
#else
|
909
|
|
- #define enable_E7() NOOP
|
910
|
|
- #define disable_E7() NOOP
|
|
996
|
+ #define ENABLE_AXIS_E7() NOOP
|
911
|
997
|
#endif
|
912
|
|
-
|
913
|
|
-#endif // !MIXING_EXTRUDER
|
|
998
|
+#endif
|
|
999
|
+#ifndef DISABLE_AXIS_E7
|
|
1000
|
+ #if E_STEPPERS > 7 && HAS_E7_DISABLE
|
|
1001
|
+ #define DISABLE_AXIS_E7() DISABLE_STEPPER_E7()
|
|
1002
|
+ #else
|
|
1003
|
+ #define DISABLE_AXIS_E7() NOOP
|
|
1004
|
+ #endif
|
|
1005
|
+#endif
|