|
@ -594,320 +594,412 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
//
|
|
|
//
|
|
|
// X, Y, Z Stepper enable / disable
|
|
|
// Individual stepper enable / disable macros
|
|
|
//
|
|
|
//
|
|
|
#if AXIS_DRIVER_TYPE_X(L6470) |
|
|
|
|
|
extern L6470 stepperX; |
|
|
|
|
|
#define X_enable() NOOP |
|
|
|
|
|
#define X_disable() stepperX.free() |
|
|
|
|
|
#elif HAS_X_ENABLE |
|
|
|
|
|
#define X_enable() X_ENABLE_WRITE( X_ENABLE_ON) |
|
|
|
|
|
#define X_disable() X_ENABLE_WRITE(!X_ENABLE_ON) |
|
|
|
|
|
#else |
|
|
|
|
|
#define X_enable() NOOP |
|
|
|
|
|
#define X_disable() NOOP |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if AXIS_DRIVER_TYPE_X2(L6470) |
|
|
#ifndef ENABLE_STEPPER_X |
|
|
extern L6470 stepperX2; |
|
|
#if HAS_X_ENABLE |
|
|
#define X2_enable() NOOP |
|
|
#define ENABLE_STEPPER_X() X_ENABLE_WRITE( X_ENABLE_ON) |
|
|
#define X2_disable() stepperX2.free() |
|
|
#else |
|
|
#elif HAS_X2_ENABLE |
|
|
#define ENABLE_STEPPER_X() NOOP |
|
|
#define X2_enable() X2_ENABLE_WRITE( X_ENABLE_ON) |
|
|
#endif |
|
|
#define X2_disable() X2_ENABLE_WRITE(!X_ENABLE_ON) |
|
|
|
|
|
#else |
|
|
|
|
|
#define X2_enable() NOOP |
|
|
|
|
|
#define X2_disable() NOOP |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
#ifndef DISABLE_STEPPER_X |
|
|
#define enable_X() do{ X_enable(); X2_enable(); }while(0) |
|
|
#if HAS_X_ENABLE |
|
|
#define disable_X() do{ X_disable(); X2_disable(); CBI(axis_known_position, X_AXIS); }while(0) |
|
|
#define DISABLE_STEPPER_X() X_ENABLE_WRITE(!X_ENABLE_ON) |
|
|
|
|
|
#else |
|
|
#if AXIS_DRIVER_TYPE_Y(L6470) |
|
|
#define DISABLE_STEPPER_X() NOOP |
|
|
extern L6470 stepperY; |
|
|
#endif |
|
|
#define Y_enable() NOOP |
|
|
|
|
|
#define Y_disable() stepperY.free() |
|
|
|
|
|
#elif HAS_Y_ENABLE |
|
|
|
|
|
#define Y_enable() Y_ENABLE_WRITE( Y_ENABLE_ON) |
|
|
|
|
|
#define Y_disable() Y_ENABLE_WRITE(!Y_ENABLE_ON) |
|
|
|
|
|
#else |
|
|
|
|
|
#define Y_enable() NOOP |
|
|
|
|
|
#define Y_disable() NOOP |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if AXIS_DRIVER_TYPE_Y2(L6470) |
|
|
#ifndef ENABLE_STEPPER_X2 |
|
|
extern L6470 stepperY2; |
|
|
#if HAS_X2_ENABLE |
|
|
#define Y2_enable() NOOP |
|
|
#define ENABLE_STEPPER_X2() X2_ENABLE_WRITE( X_ENABLE_ON) |
|
|
#define Y2_disable() stepperY2.free() |
|
|
#else |
|
|
#elif HAS_Y2_ENABLE |
|
|
#define ENABLE_STEPPER_X2() NOOP |
|
|
#define Y2_enable() Y2_ENABLE_WRITE( Y_ENABLE_ON) |
|
|
#endif |
|
|
#define Y2_disable() Y2_ENABLE_WRITE(!Y_ENABLE_ON) |
|
|
#endif |
|
|
#else |
|
|
#ifndef DISABLE_STEPPER_X2 |
|
|
#define Y2_enable() NOOP |
|
|
#if HAS_X2_ENABLE |
|
|
#define Y2_disable() NOOP |
|
|
#define DISABLE_STEPPER_X2() X2_ENABLE_WRITE(!X_ENABLE_ON) |
|
|
|
|
|
#else |
|
|
|
|
|
#define DISABLE_STEPPER_X2() NOOP |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#define enable_Y() do{ Y_enable(); Y2_enable(); }while(0) |
|
|
#ifndef ENABLE_STEPPER_Y |
|
|
#define disable_Y() do{ Y_disable(); Y2_disable(); CBI(axis_known_position, Y_AXIS); }while(0) |
|
|
#if HAS_Y_ENABLE |
|
|
|
|
|
#define ENABLE_STEPPER_Y() Y_ENABLE_WRITE( Y_ENABLE_ON) |
|
|
#if AXIS_DRIVER_TYPE_Z(L6470) |
|
|
#else |
|
|
extern L6470 stepperZ; |
|
|
#define ENABLE_STEPPER_Y() NOOP |
|
|
#define Z_enable() NOOP |
|
|
#endif |
|
|
#define Z_disable() stepperZ.free() |
|
|
#endif |
|
|
#elif HAS_Z_ENABLE |
|
|
#ifndef DISABLE_STEPPER_Y |
|
|
#define Z_enable() Z_ENABLE_WRITE( Z_ENABLE_ON) |
|
|
#if HAS_Y_ENABLE |
|
|
#define Z_disable() Z_ENABLE_WRITE(!Z_ENABLE_ON) |
|
|
#define DISABLE_STEPPER_Y() Y_ENABLE_WRITE(!Y_ENABLE_ON) |
|
|
#else |
|
|
#else |
|
|
#define Z_enable() NOOP |
|
|
#define DISABLE_STEPPER_Y() NOOP |
|
|
#define Z_disable() NOOP |
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if AXIS_DRIVER_TYPE_Z2(L6470) |
|
|
#ifndef ENABLE_STEPPER_Y2 |
|
|
extern L6470 stepperZ2; |
|
|
#if HAS_Y2_ENABLE |
|
|
#define Z2_enable() NOOP |
|
|
#define ENABLE_STEPPER_Y2() Y2_ENABLE_WRITE( Y_ENABLE_ON) |
|
|
#define Z2_disable() stepperZ2.free() |
|
|
#else |
|
|
#elif HAS_Z2_ENABLE |
|
|
#define ENABLE_STEPPER_Y2() NOOP |
|
|
#define Z2_enable() Z2_ENABLE_WRITE( Z_ENABLE_ON) |
|
|
#endif |
|
|
#define Z2_disable() Z2_ENABLE_WRITE(!Z_ENABLE_ON) |
|
|
#endif |
|
|
#else |
|
|
#ifndef DISABLE_STEPPER_Y2 |
|
|
#define Z2_enable() NOOP |
|
|
#if HAS_Y2_ENABLE |
|
|
#define Z2_disable() NOOP |
|
|
#define DISABLE_STEPPER_Y2() Y2_ENABLE_WRITE(!Y_ENABLE_ON) |
|
|
|
|
|
#else |
|
|
|
|
|
#define DISABLE_STEPPER_Y2() NOOP |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if AXIS_DRIVER_TYPE_Z3(L6470) |
|
|
#ifndef ENABLE_STEPPER_Z |
|
|
extern L6470 stepperZ3; |
|
|
#if HAS_Z_ENABLE |
|
|
#define Z3_enable() NOOP |
|
|
#define ENABLE_STEPPER_Z() Z_ENABLE_WRITE( Z_ENABLE_ON) |
|
|
#define Z3_disable() stepperZ3.free() |
|
|
#else |
|
|
#elif HAS_Z3_ENABLE |
|
|
#define ENABLE_STEPPER_Z() NOOP |
|
|
#define Z3_enable() Z3_ENABLE_WRITE( Z_ENABLE_ON) |
|
|
#endif |
|
|
#define Z3_disable() Z3_ENABLE_WRITE(!Z_ENABLE_ON) |
|
|
#endif |
|
|
#else |
|
|
#ifndef DISABLE_STEPPER_Z |
|
|
#define Z3_enable() NOOP |
|
|
#if HAS_Z_ENABLE |
|
|
#define Z3_disable() NOOP |
|
|
#define DISABLE_STEPPER_Z() Z_ENABLE_WRITE(!Z_ENABLE_ON) |
|
|
|
|
|
#else |
|
|
|
|
|
#define DISABLE_STEPPER_Z() NOOP |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if AXIS_DRIVER_TYPE_Z4(L6470) |
|
|
#ifndef ENABLE_STEPPER_Z2 |
|
|
extern L6470 stepperZ4; |
|
|
#if HAS_Z2_ENABLE |
|
|
#define Z4_enable() NOOP |
|
|
#define ENABLE_STEPPER_Z2() Z2_ENABLE_WRITE( Z_ENABLE_ON) |
|
|
#define Z4_disable() stepperZ4.free() |
|
|
#else |
|
|
#elif HAS_Z4_ENABLE |
|
|
#define ENABLE_STEPPER_Z2() NOOP |
|
|
#define Z4_enable() Z4_ENABLE_WRITE( Z_ENABLE_ON) |
|
|
#endif |
|
|
#define Z4_disable() Z4_ENABLE_WRITE(!Z_ENABLE_ON) |
|
|
#endif |
|
|
#else |
|
|
#ifndef DISABLE_STEPPER_Z2 |
|
|
#define Z4_enable() NOOP |
|
|
#if HAS_Z2_ENABLE |
|
|
#define Z4_disable() NOOP |
|
|
#define DISABLE_STEPPER_Z2() Z2_ENABLE_WRITE(!Z_ENABLE_ON) |
|
|
|
|
|
#else |
|
|
|
|
|
#define DISABLE_STEPPER_Z2() NOOP |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#define enable_Z() do{ Z_enable(); Z2_enable(); Z3_enable(); Z4_enable(); }while(0) |
|
|
#ifndef ENABLE_STEPPER_Z3 |
|
|
#define disable_Z() do{ Z_disable(); Z2_disable(); Z3_disable(); Z4_disable(); CBI(axis_known_position, Z_AXIS); }while(0) |
|
|
#if HAS_Z3_ENABLE |
|
|
|
|
|
#define ENABLE_STEPPER_Z3() Z3_ENABLE_WRITE( Z_ENABLE_ON) |
|
|
|
|
|
#else |
|
|
|
|
|
#define ENABLE_STEPPER_Z3() NOOP |
|
|
|
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
#ifndef DISABLE_STEPPER_Z3 |
|
|
|
|
|
#if HAS_Z3_ENABLE |
|
|
|
|
|
#define DISABLE_STEPPER_Z3() Z3_ENABLE_WRITE(!Z_ENABLE_ON) |
|
|
|
|
|
#else |
|
|
|
|
|
#define DISABLE_STEPPER_Z3() NOOP |
|
|
|
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
//
|
|
|
#ifndef ENABLE_STEPPER_Z4 |
|
|
// Extruder Stepper enable / disable
|
|
|
#if HAS_Z4_ENABLE |
|
|
//
|
|
|
#define ENABLE_STEPPER_Z4() Z4_ENABLE_WRITE( Z_ENABLE_ON) |
|
|
|
|
|
#else |
|
|
|
|
|
#define ENABLE_STEPPER_Z4() NOOP |
|
|
|
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
#ifndef DISABLE_STEPPER_Z4 |
|
|
|
|
|
#if HAS_Z4_ENABLE |
|
|
|
|
|
#define DISABLE_STEPPER_Z4() Z4_ENABLE_WRITE(!Z_ENABLE_ON) |
|
|
|
|
|
#else |
|
|
|
|
|
#define DISABLE_STEPPER_Z4() NOOP |
|
|
|
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
// define the individual enables/disables
|
|
|
#ifndef ENABLE_STEPPER_E0 |
|
|
#if AXIS_DRIVER_TYPE_E0(L6470) |
|
|
#if HAS_E0_ENABLE |
|
|
extern L6470 stepperE0; |
|
|
#define ENABLE_STEPPER_E0() E0_ENABLE_WRITE( E_ENABLE_ON) |
|
|
#define E0_enable() NOOP |
|
|
#else |
|
|
#define E0_disable() do{ stepperE0.free(); CBI(axis_known_position, E_AXIS); }while(0) |
|
|
#define ENABLE_STEPPER_E0() NOOP |
|
|
#elif HAS_E0_ENABLE |
|
|
#endif |
|
|
#define E0_enable() E0_ENABLE_WRITE( E_ENABLE_ON) |
|
|
#endif |
|
|
#define E0_disable() E0_ENABLE_WRITE(!E_ENABLE_ON) |
|
|
#ifndef DISABLE_STEPPER_E0 |
|
|
#else |
|
|
#if HAS_E0_ENABLE |
|
|
#define E0_enable() NOOP |
|
|
#define DISABLE_STEPPER_E0() E0_ENABLE_WRITE(!E_ENABLE_ON) |
|
|
#define E0_disable() NOOP |
|
|
#else |
|
|
|
|
|
#define DISABLE_STEPPER_E0() NOOP |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if AXIS_DRIVER_TYPE_E1(L6470) |
|
|
#ifndef ENABLE_STEPPER_E1 |
|
|
extern L6470 stepperE1; |
|
|
#if E_STEPPERS > 1 && HAS_E1_ENABLE |
|
|
#define E1_enable() NOOP |
|
|
#define ENABLE_STEPPER_E1() E1_ENABLE_WRITE( E_ENABLE_ON) |
|
|
#define E1_disable() do{ stepperE1.free(); CBI(axis_known_position, E_AXIS); }while(0) |
|
|
#else |
|
|
#elif E_STEPPERS > 1 && HAS_E1_ENABLE |
|
|
#define ENABLE_STEPPER_E1() NOOP |
|
|
#define E1_enable() E1_ENABLE_WRITE( E_ENABLE_ON) |
|
|
#endif |
|
|
#define E1_disable() E1_ENABLE_WRITE(!E_ENABLE_ON) |
|
|
#endif |
|
|
#else |
|
|
#ifndef DISABLE_STEPPER_E1 |
|
|
#define E1_enable() NOOP |
|
|
#if E_STEPPERS > 1 && HAS_E1_ENABLE |
|
|
#define E1_disable() NOOP |
|
|
#define DISABLE_STEPPER_E1() E1_ENABLE_WRITE(!E_ENABLE_ON) |
|
|
|
|
|
#else |
|
|
|
|
|
#define DISABLE_STEPPER_E1() NOOP |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if AXIS_DRIVER_TYPE_E2(L6470) |
|
|
#ifndef ENABLE_STEPPER_E2 |
|
|
extern L6470 stepperE2; |
|
|
#if E_STEPPERS > 2 && HAS_E2_ENABLE |
|
|
#define E2_enable() NOOP |
|
|
#define ENABLE_STEPPER_E2() E2_ENABLE_WRITE( E_ENABLE_ON) |
|
|
#define E2_disable() do{ stepperE2.free(); CBI(axis_known_position, E_AXIS); }while(0) |
|
|
#else |
|
|
#elif E_STEPPERS > 2 && HAS_E2_ENABLE |
|
|
#define ENABLE_STEPPER_E2() NOOP |
|
|
#define E2_enable() E2_ENABLE_WRITE( E_ENABLE_ON) |
|
|
#endif |
|
|
#define E2_disable() E2_ENABLE_WRITE(!E_ENABLE_ON) |
|
|
#endif |
|
|
#else |
|
|
#ifndef DISABLE_STEPPER_E2 |
|
|
#define E2_enable() NOOP |
|
|
#if E_STEPPERS > 2 && HAS_E2_ENABLE |
|
|
#define E2_disable() NOOP |
|
|
#define DISABLE_STEPPER_E2() E2_ENABLE_WRITE(!E_ENABLE_ON) |
|
|
|
|
|
#else |
|
|
|
|
|
#define DISABLE_STEPPER_E2() NOOP |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if AXIS_DRIVER_TYPE_E3(L6470) |
|
|
#ifndef ENABLE_STEPPER_E3 |
|
|
extern L6470 stepperE3; |
|
|
#if E_STEPPERS > 3 && HAS_E3_ENABLE |
|
|
#define E3_enable() NOOP |
|
|
#define ENABLE_STEPPER_E3() E3_ENABLE_WRITE( E_ENABLE_ON) |
|
|
#define E3_disable() do{ stepperE3.free(); CBI(axis_known_position, E_AXIS); }while(0) |
|
|
#else |
|
|
#elif E_STEPPERS > 3 && HAS_E3_ENABLE |
|
|
#define ENABLE_STEPPER_E3() NOOP |
|
|
#define E3_enable() E3_ENABLE_WRITE( E_ENABLE_ON) |
|
|
#endif |
|
|
#define E3_disable() E3_ENABLE_WRITE(!E_ENABLE_ON) |
|
|
#endif |
|
|
#else |
|
|
#ifndef DISABLE_STEPPER_E3 |
|
|
#define E3_enable() NOOP |
|
|
#if E_STEPPERS > 3 && HAS_E3_ENABLE |
|
|
#define E3_disable() NOOP |
|
|
#define DISABLE_STEPPER_E3() E3_ENABLE_WRITE(!E_ENABLE_ON) |
|
|
|
|
|
#else |
|
|
|
|
|
#define DISABLE_STEPPER_E3() NOOP |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if AXIS_DRIVER_TYPE_E4(L6470) |
|
|
#ifndef ENABLE_STEPPER_E4 |
|
|
extern L6470 stepperE4; |
|
|
#if E_STEPPERS > 4 && HAS_E4_ENABLE |
|
|
#define E4_enable() NOOP |
|
|
#define ENABLE_STEPPER_E4() E4_ENABLE_WRITE( E_ENABLE_ON) |
|
|
#define E4_disable() do{ stepperE4.free(); CBI(axis_known_position, E_AXIS); }while(0) |
|
|
#else |
|
|
#elif E_STEPPERS > 4 && HAS_E4_ENABLE |
|
|
#define ENABLE_STEPPER_E4() NOOP |
|
|
#define E4_enable() E4_ENABLE_WRITE( E_ENABLE_ON) |
|
|
#endif |
|
|
#define E4_disable() E4_ENABLE_WRITE(!E_ENABLE_ON) |
|
|
#endif |
|
|
#else |
|
|
#ifndef DISABLE_STEPPER_E4 |
|
|
#define E4_enable() NOOP |
|
|
#if E_STEPPERS > 4 && HAS_E4_ENABLE |
|
|
#define E4_disable() NOOP |
|
|
#define DISABLE_STEPPER_E4() E4_ENABLE_WRITE(!E_ENABLE_ON) |
|
|
|
|
|
#else |
|
|
|
|
|
#define DISABLE_STEPPER_E4() NOOP |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if AXIS_DRIVER_TYPE_E5(L6470) |
|
|
#ifndef ENABLE_STEPPER_E5 |
|
|
extern L6470 stepperE5; |
|
|
#if E_STEPPERS > 5 && HAS_E5_ENABLE |
|
|
#define E5_enable() NOOP |
|
|
#define ENABLE_STEPPER_E5() E5_ENABLE_WRITE( E_ENABLE_ON) |
|
|
#define E5_disable() do{ stepperE5.free(); CBI(axis_known_position, E_AXIS); }while(0) |
|
|
#else |
|
|
#elif E_STEPPERS > 5 && HAS_E5_ENABLE |
|
|
#define ENABLE_STEPPER_E5() NOOP |
|
|
#define E5_enable() E5_ENABLE_WRITE( E_ENABLE_ON) |
|
|
#endif |
|
|
#define E5_disable() E5_ENABLE_WRITE(!E_ENABLE_ON) |
|
|
#endif |
|
|
#else |
|
|
#ifndef DISABLE_STEPPER_E5 |
|
|
#define E5_enable() NOOP |
|
|
#if E_STEPPERS > 5 && HAS_E5_ENABLE |
|
|
#define E5_disable() NOOP |
|
|
#define DISABLE_STEPPER_E5() E5_ENABLE_WRITE(!E_ENABLE_ON) |
|
|
|
|
|
#else |
|
|
|
|
|
#define DISABLE_STEPPER_E5() NOOP |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if AXIS_DRIVER_TYPE_E6(L6470) |
|
|
#ifndef ENABLE_STEPPER_E6 |
|
|
extern L6470 stepperE6; |
|
|
#if E_STEPPERS > 6 && HAS_E6_ENABLE |
|
|
#define E6_enable() NOOP |
|
|
#define ENABLE_STEPPER_E6() E6_ENABLE_WRITE( E_ENABLE_ON) |
|
|
#define E6_disable() do{ stepperE6.free(); CBI(axis_known_position, E_AXIS); }while(0) |
|
|
#else |
|
|
#elif E_STEPPERS > 6 && HAS_E6_ENABLE |
|
|
#define ENABLE_STEPPER_E6() NOOP |
|
|
#define E6_enable() E6_ENABLE_WRITE( E_ENABLE_ON) |
|
|
#endif |
|
|
#define E6_disable() E6_ENABLE_WRITE(!E_ENABLE_ON) |
|
|
#endif |
|
|
#else |
|
|
#ifndef DISABLE_STEPPER_E6 |
|
|
#define E6_enable() NOOP |
|
|
#if E_STEPPERS > 6 && HAS_E6_ENABLE |
|
|
#define E6_disable() NOOP |
|
|
#define DISABLE_STEPPER_E6() E6_ENABLE_WRITE(!E_ENABLE_ON) |
|
|
|
|
|
#else |
|
|
|
|
|
#define DISABLE_STEPPER_E6() NOOP |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if AXIS_DRIVER_TYPE_E7(L6470) |
|
|
#ifndef ENABLE_STEPPER_E7 |
|
|
extern L6470 stepperE7; |
|
|
#if E_STEPPERS > 7 && HAS_E7_ENABLE |
|
|
#define E7_enable() NOOP |
|
|
#define ENABLE_STEPPER_E7() E7_ENABLE_WRITE( E_ENABLE_ON) |
|
|
#define E7_disable() do{ stepperE7.free(); CBI(axis_known_position, E_AXIS); }while(0) |
|
|
#else |
|
|
#elif E_STEPPERS > 7 && HAS_E7_ENABLE |
|
|
#define ENABLE_STEPPER_E7() NOOP |
|
|
#define E7_enable() E7_ENABLE_WRITE( E_ENABLE_ON) |
|
|
#endif |
|
|
#define E7_disable() E7_ENABLE_WRITE(!E_ENABLE_ON) |
|
|
|
|
|
#else |
|
|
|
|
|
#define E7_enable() NOOP |
|
|
|
|
|
#define E7_disable() NOOP |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
#ifndef DISABLE_STEPPER_E7 |
|
|
|
|
|
#if E_STEPPERS > 7 && HAS_E7_ENABLE |
|
|
|
|
|
#define DISABLE_STEPPER_E7() E7_ENABLE_WRITE(!E_ENABLE_ON) |
|
|
|
|
|
#else |
|
|
|
|
|
#define DISABLE_STEPPER_E7() NOOP |
|
|
|
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
// Axis steppers enable / disable macros
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
#define ENABLE_AXIS_X() do{ ENABLE_STEPPER_X(); ENABLE_STEPPER_X2(); }while(0) |
|
|
|
|
|
#define DISABLE_AXIS_X() do{ DISABLE_STEPPER_X(); DISABLE_STEPPER_X2(); CBI(axis_known_position, X_AXIS); }while(0) |
|
|
|
|
|
|
|
|
|
|
|
#define ENABLE_AXIS_Y() do{ ENABLE_STEPPER_Y(); ENABLE_STEPPER_Y2(); }while(0) |
|
|
|
|
|
#define DISABLE_AXIS_Y() do{ DISABLE_STEPPER_Y(); DISABLE_STEPPER_Y2(); CBI(axis_known_position, Y_AXIS); }while(0) |
|
|
|
|
|
|
|
|
|
|
|
#define ENABLE_AXIS_Z() do{ ENABLE_STEPPER_Z(); ENABLE_STEPPER_Z2(); ENABLE_STEPPER_Z3(); ENABLE_STEPPER_Z4(); }while(0) |
|
|
|
|
|
#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) |
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
// Extruder steppers enable / disable macros
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
#if ENABLED(MIXING_EXTRUDER) |
|
|
#if ENABLED(MIXING_EXTRUDER) |
|
|
|
|
|
|
|
|
/**
|
|
|
/**
|
|
|
* Mixing steppers synchronize their enable (and direction) together |
|
|
* Mixing steppers keep all their enable (and direction) states synchronized |
|
|
*/ |
|
|
*/ |
|
|
#if MIXING_STEPPERS > 7 |
|
|
#if MIXING_STEPPERS > 7 |
|
|
#define enable_E0() { E0_enable(); E1_enable(); E2_enable(); E3_enable(); E4_enable(); E5_enable(); E6_enable(); E7_enable(); } |
|
|
#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(); } |
|
|
#define disable_E0() { E0_disable(); E1_disable(); E2_disable(); E3_disable(); E4_disable(); E5_disable(); E6_disable(); E7_disable(); } |
|
|
#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(); } |
|
|
#elif MIXING_STEPPERS > 6 |
|
|
#elif MIXING_STEPPERS > 6 |
|
|
#define enable_E0() { E0_enable(); E1_enable(); E2_enable(); E3_enable(); E4_enable(); E5_enable(); E6_enable(); } |
|
|
#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(); } |
|
|
#define disable_E0() { E0_disable(); E1_disable(); E2_disable(); E3_disable(); E4_disable(); E5_disable(); E6_disable(); } |
|
|
#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(); } |
|
|
#elif MIXING_STEPPERS > 5 |
|
|
#elif MIXING_STEPPERS > 5 |
|
|
#define enable_E0() { E0_enable(); E1_enable(); E2_enable(); E3_enable(); E4_enable(); E5_enable(); } |
|
|
#define ENABLE_AXIS_E0() { ENABLE_STEPPER_E0(); ENABLE_STEPPER_E1(); ENABLE_STEPPER_E2(); ENABLE_STEPPER_E3(); ENABLE_STEPPER_E4(); ENABLE_STEPPER_E5(); } |
|
|
#define disable_E0() { E0_disable(); E1_disable(); E2_disable(); E3_disable(); E4_disable(); E5_disable(); } |
|
|
#define DISABLE_AXIS_E0() { DISABLE_STEPPER_E0(); DISABLE_STEPPER_E1(); DISABLE_STEPPER_E2(); DISABLE_STEPPER_E3(); DISABLE_STEPPER_E4(); DISABLE_STEPPER_E5(); } |
|
|
#elif MIXING_STEPPERS > 4 |
|
|
#elif MIXING_STEPPERS > 4 |
|
|
#define enable_E0() { E0_enable(); E1_enable(); E2_enable(); E3_enable(); E4_enable(); } |
|
|
#define ENABLE_AXIS_E0() { ENABLE_STEPPER_E0(); ENABLE_STEPPER_E1(); ENABLE_STEPPER_E2(); ENABLE_STEPPER_E3(); ENABLE_STEPPER_E4(); } |
|
|
#define disable_E0() { E0_disable(); E1_disable(); E2_disable(); E3_disable(); E4_disable(); } |
|
|
#define DISABLE_AXIS_E0() { DISABLE_STEPPER_E0(); DISABLE_STEPPER_E1(); DISABLE_STEPPER_E2(); DISABLE_STEPPER_E3(); DISABLE_STEPPER_E4(); } |
|
|
#elif MIXING_STEPPERS > 3 |
|
|
#elif MIXING_STEPPERS > 3 |
|
|
#define enable_E0() { E0_enable(); E1_enable(); E2_enable(); E3_enable(); } |
|
|
#define ENABLE_AXIS_E0() { ENABLE_STEPPER_E0(); ENABLE_STEPPER_E1(); ENABLE_STEPPER_E2(); ENABLE_STEPPER_E3(); } |
|
|
#define disable_E0() { E0_disable(); E1_disable(); E2_disable(); E3_disable(); } |
|
|
#define DISABLE_AXIS_E0() { DISABLE_STEPPER_E0(); DISABLE_STEPPER_E1(); DISABLE_STEPPER_E2(); DISABLE_STEPPER_E3(); } |
|
|
#elif MIXING_STEPPERS > 2 |
|
|
#elif MIXING_STEPPERS > 2 |
|
|
#define enable_E0() { E0_enable(); E1_enable(); E2_enable(); } |
|
|
#define ENABLE_AXIS_E0() { ENABLE_STEPPER_E0(); ENABLE_STEPPER_E1(); ENABLE_STEPPER_E2(); } |
|
|
#define disable_E0() { E0_disable(); E1_disable(); E2_disable(); } |
|
|
#define DISABLE_AXIS_E0() { DISABLE_STEPPER_E0(); DISABLE_STEPPER_E1(); DISABLE_STEPPER_E2(); } |
|
|
#else |
|
|
#else |
|
|
#define enable_E0() { E0_enable(); E1_enable(); } |
|
|
#define ENABLE_AXIS_E0() { ENABLE_STEPPER_E0(); ENABLE_STEPPER_E1(); } |
|
|
#define disable_E0() { E0_disable(); E1_disable(); } |
|
|
#define DISABLE_AXIS_E0() { DISABLE_STEPPER_E0(); DISABLE_STEPPER_E1(); } |
|
|
#endif |
|
|
#endif |
|
|
#define enable_E1() NOOP |
|
|
|
|
|
#define disable_E1() NOOP |
|
|
|
|
|
#define enable_E2() NOOP |
|
|
|
|
|
#define disable_E2() NOOP |
|
|
|
|
|
#define enable_E3() NOOP |
|
|
|
|
|
#define disable_E3() NOOP |
|
|
|
|
|
#define enable_E4() NOOP |
|
|
|
|
|
#define disable_E4() NOOP |
|
|
|
|
|
#define enable_E5() NOOP |
|
|
|
|
|
#define disable_E5() NOOP |
|
|
|
|
|
#define enable_E6() NOOP |
|
|
|
|
|
#define disable_E6() NOOP |
|
|
|
|
|
#define enable_E7() NOOP |
|
|
|
|
|
#define disable_E7() NOOP |
|
|
|
|
|
|
|
|
|
|
|
#else // !MIXING_EXTRUDER
|
|
|
|
|
|
|
|
|
|
|
|
#if HAS_E0_ENABLE |
|
|
#endif // !MIXING_EXTRUDER
|
|
|
#define enable_E0() E0_enable() |
|
|
|
|
|
#define disable_E0() E0_disable() |
|
|
#ifndef ENABLE_AXIS_E0 |
|
|
|
|
|
#if E_STEPPERS > 0 && HAS_E0_ENABLE |
|
|
|
|
|
#define ENABLE_AXIS_E0() ENABLE_STEPPER_E0() |
|
|
#else |
|
|
#else |
|
|
#define enable_E0() NOOP |
|
|
#define ENABLE_AXIS_E0() NOOP |
|
|
#define disable_E0() NOOP |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
#ifndef DISABLE_AXIS_E0 |
|
|
|
|
|
#if E_STEPPERS > 0 && HAS_E0_DISABLE |
|
|
|
|
|
#define DISABLE_AXIS_E0() DISABLE_STEPPER_E0() |
|
|
|
|
|
#else |
|
|
|
|
|
#define DISABLE_AXIS_E0() NOOP |
|
|
|
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifndef ENABLE_AXIS_E1 |
|
|
#if E_STEPPERS > 1 && HAS_E1_ENABLE |
|
|
#if E_STEPPERS > 1 && HAS_E1_ENABLE |
|
|
#define enable_E1() E1_enable() |
|
|
#define ENABLE_AXIS_E1() ENABLE_STEPPER_E1() |
|
|
#define disable_E1() E1_disable() |
|
|
|
|
|
#else |
|
|
#else |
|
|
#define enable_E1() NOOP |
|
|
#define ENABLE_AXIS_E1() NOOP |
|
|
#define disable_E1() NOOP |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
#ifndef DISABLE_AXIS_E1 |
|
|
|
|
|
#if E_STEPPERS > 1 && HAS_E1_DISABLE |
|
|
|
|
|
#define DISABLE_AXIS_E1() DISABLE_STEPPER_E1() |
|
|
|
|
|
#else |
|
|
|
|
|
#define DISABLE_AXIS_E1() NOOP |
|
|
|
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifndef ENABLE_AXIS_E2 |
|
|
#if E_STEPPERS > 2 && HAS_E2_ENABLE |
|
|
#if E_STEPPERS > 2 && HAS_E2_ENABLE |
|
|
#define enable_E2() E2_enable() |
|
|
#define ENABLE_AXIS_E2() ENABLE_STEPPER_E2() |
|
|
#define disable_E2() E2_disable() |
|
|
#else |
|
|
|
|
|
#define ENABLE_AXIS_E2() NOOP |
|
|
|
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
#ifndef DISABLE_AXIS_E2 |
|
|
|
|
|
#if E_STEPPERS > 2 && HAS_E2_DISABLE |
|
|
|
|
|
#define DISABLE_AXIS_E2() DISABLE_STEPPER_E2() |
|
|
#else |
|
|
#else |
|
|
#define enable_E2() NOOP |
|
|
#define DISABLE_AXIS_E2() NOOP |
|
|
#define disable_E2() NOOP |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifndef ENABLE_AXIS_E3 |
|
|
#if E_STEPPERS > 3 && HAS_E3_ENABLE |
|
|
#if E_STEPPERS > 3 && HAS_E3_ENABLE |
|
|
#define enable_E3() E3_enable() |
|
|
#define ENABLE_AXIS_E3() ENABLE_STEPPER_E3() |
|
|
#define disable_E3() E3_disable() |
|
|
|
|
|
#else |
|
|
#else |
|
|
#define enable_E3() NOOP |
|
|
#define ENABLE_AXIS_E3() NOOP |
|
|
#define disable_E3() NOOP |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
#ifndef DISABLE_AXIS_E3 |
|
|
|
|
|
#if E_STEPPERS > 3 && HAS_E3_DISABLE |
|
|
|
|
|
#define DISABLE_AXIS_E3() DISABLE_STEPPER_E3() |
|
|
|
|
|
#else |
|
|
|
|
|
#define DISABLE_AXIS_E3() NOOP |
|
|
|
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifndef ENABLE_AXIS_E4 |
|
|
#if E_STEPPERS > 4 && HAS_E4_ENABLE |
|
|
#if E_STEPPERS > 4 && HAS_E4_ENABLE |
|
|
#define enable_E4() E4_enable() |
|
|
#define ENABLE_AXIS_E4() ENABLE_STEPPER_E4() |
|
|
#define disable_E4() E4_disable() |
|
|
#else |
|
|
|
|
|
#define ENABLE_AXIS_E4() NOOP |
|
|
|
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
#ifndef DISABLE_AXIS_E4 |
|
|
|
|
|
#if E_STEPPERS > 4 && HAS_E4_DISABLE |
|
|
|
|
|
#define DISABLE_AXIS_E4() DISABLE_STEPPER_E4() |
|
|
#else |
|
|
#else |
|
|
#define enable_E4() NOOP |
|
|
#define DISABLE_AXIS_E4() NOOP |
|
|
#define disable_E4() NOOP |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifndef ENABLE_AXIS_E5 |
|
|
#if E_STEPPERS > 5 && HAS_E5_ENABLE |
|
|
#if E_STEPPERS > 5 && HAS_E5_ENABLE |
|
|
#define enable_E5() E5_enable() |
|
|
#define ENABLE_AXIS_E5() ENABLE_STEPPER_E5() |
|
|
#define disable_E5() E5_disable() |
|
|
|
|
|
#else |
|
|
#else |
|
|
#define enable_E5() NOOP |
|
|
#define ENABLE_AXIS_E5() NOOP |
|
|
#define disable_E5() NOOP |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
#ifndef DISABLE_AXIS_E5 |
|
|
|
|
|
#if E_STEPPERS > 5 && HAS_E5_DISABLE |
|
|
|
|
|
#define DISABLE_AXIS_E5() DISABLE_STEPPER_E5() |
|
|
|
|
|
#else |
|
|
|
|
|
#define DISABLE_AXIS_E5() NOOP |
|
|
|
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifndef ENABLE_AXIS_E6 |
|
|
#if E_STEPPERS > 6 && HAS_E6_ENABLE |
|
|
#if E_STEPPERS > 6 && HAS_E6_ENABLE |
|
|
#define enable_E6() E6_enable() |
|
|
#define ENABLE_AXIS_E6() ENABLE_STEPPER_E6() |
|
|
#define disable_E6() E6_disable() |
|
|
|
|
|
#else |
|
|
#else |
|
|
#define enable_E6() NOOP |
|
|
#define ENABLE_AXIS_E6() NOOP |
|
|
#define disable_E6() NOOP |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
#ifndef DISABLE_AXIS_E6 |
|
|
|
|
|
#if E_STEPPERS > 6 && HAS_E6_DISABLE |
|
|
|
|
|
#define DISABLE_AXIS_E6() DISABLE_STEPPER_E6() |
|
|
|
|
|
#else |
|
|
|
|
|
#define DISABLE_AXIS_E6() NOOP |
|
|
|
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifndef ENABLE_AXIS_E7 |
|
|
#if E_STEPPERS > 7 && HAS_E7_ENABLE |
|
|
#if E_STEPPERS > 7 && HAS_E7_ENABLE |
|
|
#define enable_E7() E7_enable() |
|
|
#define ENABLE_AXIS_E7() ENABLE_STEPPER_E7() |
|
|
#define disable_E7() E7_disable() |
|
|
|
|
|
#else |
|
|
#else |
|
|
#define enable_E7() NOOP |
|
|
#define ENABLE_AXIS_E7() NOOP |
|
|
#define disable_E7() NOOP |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
#endif |
|
|
#endif // !MIXING_EXTRUDER
|
|
|
#ifndef DISABLE_AXIS_E7 |
|
|
|
|
|
#if E_STEPPERS > 7 && HAS_E7_DISABLE |
|
|
|
|
|
#define DISABLE_AXIS_E7() DISABLE_STEPPER_E7() |
|
|
|
|
|
#else |
|
|
|
|
|
#define DISABLE_AXIS_E7() NOOP |
|
|
|
|
|
#endif |
|
|
|
|
|
#endif |
|
|