|
|
|
@ -90,10 +90,10 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern L6470 stepperX;
|
|
|
|
|
#define X_ENABLE_INIT NOOP
|
|
|
|
|
#define X_ENABLE_WRITE(STATE) NOOP
|
|
|
|
|
#define X_ENABLE_READ (stepperX.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define X_ENABLE_READ() (stepperX.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define X_DIR_INIT NOOP
|
|
|
|
|
#define X_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,X)
|
|
|
|
|
#define X_DIR_READ (stepperX.getStatus() & STATUS_DIR)
|
|
|
|
|
#define X_DIR_READ() (stepperX.getStatus() & STATUS_DIR)
|
|
|
|
|
#else
|
|
|
|
|
#if AXIS_IS_TMC(X)
|
|
|
|
|
extern TMC_CLASS(X, X) stepperX;
|
|
|
|
@ -102,19 +102,19 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern TMC26XStepper stepperX;
|
|
|
|
|
#define X_ENABLE_INIT NOOP
|
|
|
|
|
#define X_ENABLE_WRITE(STATE) stepperX.setEnabled(STATE)
|
|
|
|
|
#define X_ENABLE_READ stepperX.isEnabled()
|
|
|
|
|
#define X_ENABLE_READ() stepperX.isEnabled()
|
|
|
|
|
#elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(X)
|
|
|
|
|
#define X_ENABLE_INIT NOOP
|
|
|
|
|
#define X_ENABLE_WRITE(STATE) stepperX.toff((STATE)==X_ENABLE_ON ? chopper_timing.toff : 0)
|
|
|
|
|
#define X_ENABLE_READ stepperX.isEnabled()
|
|
|
|
|
#define X_ENABLE_READ() stepperX.isEnabled()
|
|
|
|
|
#else
|
|
|
|
|
#define X_ENABLE_INIT SET_OUTPUT(X_ENABLE_PIN)
|
|
|
|
|
#define X_ENABLE_WRITE(STATE) WRITE(X_ENABLE_PIN,STATE)
|
|
|
|
|
#define X_ENABLE_READ READ(X_ENABLE_PIN)
|
|
|
|
|
#define X_ENABLE_READ() READ(X_ENABLE_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define X_DIR_INIT SET_OUTPUT(X_DIR_PIN)
|
|
|
|
|
#define X_DIR_WRITE(STATE) WRITE(X_DIR_PIN,STATE)
|
|
|
|
|
#define X_DIR_READ READ(X_DIR_PIN)
|
|
|
|
|
#define X_DIR_READ() READ(X_DIR_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define X_STEP_INIT SET_OUTPUT(X_STEP_PIN)
|
|
|
|
|
#if AXIS_HAS_SQUARE_WAVE(X)
|
|
|
|
@ -129,10 +129,10 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern L6470 stepperY;
|
|
|
|
|
#define Y_ENABLE_INIT NOOP
|
|
|
|
|
#define Y_ENABLE_WRITE(STATE) NOOP
|
|
|
|
|
#define Y_ENABLE_READ (stepperY.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define Y_ENABLE_READ() (stepperY.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define Y_DIR_INIT NOOP
|
|
|
|
|
#define Y_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,Y)
|
|
|
|
|
#define Y_DIR_READ (stepperY.getStatus() & STATUS_DIR)
|
|
|
|
|
#define Y_DIR_READ() (stepperY.getStatus() & STATUS_DIR)
|
|
|
|
|
#else
|
|
|
|
|
#if AXIS_IS_TMC(Y)
|
|
|
|
|
extern TMC_CLASS(Y, Y) stepperY;
|
|
|
|
@ -141,19 +141,19 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern TMC26XStepper stepperY;
|
|
|
|
|
#define Y_ENABLE_INIT NOOP
|
|
|
|
|
#define Y_ENABLE_WRITE(STATE) stepperY.setEnabled(STATE)
|
|
|
|
|
#define Y_ENABLE_READ stepperY.isEnabled()
|
|
|
|
|
#define Y_ENABLE_READ() stepperY.isEnabled()
|
|
|
|
|
#elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y)
|
|
|
|
|
#define Y_ENABLE_INIT NOOP
|
|
|
|
|
#define Y_ENABLE_WRITE(STATE) stepperY.toff((STATE)==Y_ENABLE_ON ? chopper_timing.toff : 0)
|
|
|
|
|
#define Y_ENABLE_READ stepperY.isEnabled()
|
|
|
|
|
#define Y_ENABLE_READ() stepperY.isEnabled()
|
|
|
|
|
#else
|
|
|
|
|
#define Y_ENABLE_INIT SET_OUTPUT(Y_ENABLE_PIN)
|
|
|
|
|
#define Y_ENABLE_WRITE(STATE) WRITE(Y_ENABLE_PIN,STATE)
|
|
|
|
|
#define Y_ENABLE_READ READ(Y_ENABLE_PIN)
|
|
|
|
|
#define Y_ENABLE_READ() READ(Y_ENABLE_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define Y_DIR_INIT SET_OUTPUT(Y_DIR_PIN)
|
|
|
|
|
#define Y_DIR_WRITE(STATE) WRITE(Y_DIR_PIN,STATE)
|
|
|
|
|
#define Y_DIR_READ READ(Y_DIR_PIN)
|
|
|
|
|
#define Y_DIR_READ() READ(Y_DIR_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define Y_STEP_INIT SET_OUTPUT(Y_STEP_PIN)
|
|
|
|
|
#if AXIS_HAS_SQUARE_WAVE(Y)
|
|
|
|
@ -168,10 +168,10 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern L6470 stepperZ;
|
|
|
|
|
#define Z_ENABLE_INIT NOOP
|
|
|
|
|
#define Z_ENABLE_WRITE(STATE) NOOP
|
|
|
|
|
#define Z_ENABLE_READ (stepperZ.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define Z_ENABLE_READ() (stepperZ.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define Z_DIR_INIT NOOP
|
|
|
|
|
#define Z_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,Z)
|
|
|
|
|
#define Z_DIR_READ (stepperZ.getStatus() & STATUS_DIR)
|
|
|
|
|
#define Z_DIR_READ() (stepperZ.getStatus() & STATUS_DIR)
|
|
|
|
|
#else
|
|
|
|
|
#if AXIS_IS_TMC(Z)
|
|
|
|
|
extern TMC_CLASS(Z, Z) stepperZ;
|
|
|
|
@ -180,19 +180,19 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern TMC26XStepper stepperZ;
|
|
|
|
|
#define Z_ENABLE_INIT NOOP
|
|
|
|
|
#define Z_ENABLE_WRITE(STATE) stepperZ.setEnabled(STATE)
|
|
|
|
|
#define Z_ENABLE_READ stepperZ.isEnabled()
|
|
|
|
|
#define Z_ENABLE_READ() stepperZ.isEnabled()
|
|
|
|
|
#elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z)
|
|
|
|
|
#define Z_ENABLE_INIT NOOP
|
|
|
|
|
#define Z_ENABLE_WRITE(STATE) stepperZ.toff((STATE)==Z_ENABLE_ON ? chopper_timing.toff : 0)
|
|
|
|
|
#define Z_ENABLE_READ stepperZ.isEnabled()
|
|
|
|
|
#define Z_ENABLE_READ() stepperZ.isEnabled()
|
|
|
|
|
#else
|
|
|
|
|
#define Z_ENABLE_INIT SET_OUTPUT(Z_ENABLE_PIN)
|
|
|
|
|
#define Z_ENABLE_WRITE(STATE) WRITE(Z_ENABLE_PIN,STATE)
|
|
|
|
|
#define Z_ENABLE_READ READ(Z_ENABLE_PIN)
|
|
|
|
|
#define Z_ENABLE_READ() READ(Z_ENABLE_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define Z_DIR_INIT SET_OUTPUT(Z_DIR_PIN)
|
|
|
|
|
#define Z_DIR_WRITE(STATE) WRITE(Z_DIR_PIN,STATE)
|
|
|
|
|
#define Z_DIR_READ READ(Z_DIR_PIN)
|
|
|
|
|
#define Z_DIR_READ() READ(Z_DIR_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define Z_STEP_INIT SET_OUTPUT(Z_STEP_PIN)
|
|
|
|
|
#if AXIS_HAS_SQUARE_WAVE(Z)
|
|
|
|
@ -208,10 +208,10 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern L6470 stepperX2;
|
|
|
|
|
#define X2_ENABLE_INIT NOOP
|
|
|
|
|
#define X2_ENABLE_WRITE(STATE) NOOP
|
|
|
|
|
#define X2_ENABLE_READ (stepperX2.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define X2_ENABLE_READ() (stepperX2.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define X2_DIR_INIT NOOP
|
|
|
|
|
#define X2_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,X2)
|
|
|
|
|
#define X2_DIR_READ (stepperX2.getStatus() & STATUS_DIR)
|
|
|
|
|
#define X2_DIR_READ() (stepperX2.getStatus() & STATUS_DIR)
|
|
|
|
|
#else
|
|
|
|
|
#if AXIS_IS_TMC(X2)
|
|
|
|
|
extern TMC_CLASS(X2, X) stepperX2;
|
|
|
|
@ -220,19 +220,19 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern TMC26XStepper stepperX2;
|
|
|
|
|
#define X2_ENABLE_INIT NOOP
|
|
|
|
|
#define X2_ENABLE_WRITE(STATE) stepperX2.setEnabled(STATE)
|
|
|
|
|
#define X2_ENABLE_READ stepperX2.isEnabled()
|
|
|
|
|
#define X2_ENABLE_READ() stepperX2.isEnabled()
|
|
|
|
|
#elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(X2)
|
|
|
|
|
#define X2_ENABLE_INIT NOOP
|
|
|
|
|
#define X2_ENABLE_WRITE(STATE) stepperX2.toff((STATE)==X_ENABLE_ON ? chopper_timing.toff : 0)
|
|
|
|
|
#define X2_ENABLE_READ stepperX2.isEnabled()
|
|
|
|
|
#define X2_ENABLE_READ() stepperX2.isEnabled()
|
|
|
|
|
#else
|
|
|
|
|
#define X2_ENABLE_INIT SET_OUTPUT(X2_ENABLE_PIN)
|
|
|
|
|
#define X2_ENABLE_WRITE(STATE) WRITE(X2_ENABLE_PIN,STATE)
|
|
|
|
|
#define X2_ENABLE_READ READ(X2_ENABLE_PIN)
|
|
|
|
|
#define X2_ENABLE_READ() READ(X2_ENABLE_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define X2_DIR_INIT SET_OUTPUT(X2_DIR_PIN)
|
|
|
|
|
#define X2_DIR_WRITE(STATE) WRITE(X2_DIR_PIN,STATE)
|
|
|
|
|
#define X2_DIR_READ READ(X2_DIR_PIN)
|
|
|
|
|
#define X2_DIR_READ() READ(X2_DIR_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define X2_STEP_INIT SET_OUTPUT(X2_STEP_PIN)
|
|
|
|
|
#if AXIS_HAS_SQUARE_WAVE(X2)
|
|
|
|
@ -250,10 +250,10 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern L6470 stepperY2;
|
|
|
|
|
#define Y2_ENABLE_INIT NOOP
|
|
|
|
|
#define Y2_ENABLE_WRITE(STATE) NOOP
|
|
|
|
|
#define Y2_ENABLE_READ (stepperY2.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define Y2_ENABLE_READ() (stepperY2.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define Y2_DIR_INIT NOOP
|
|
|
|
|
#define Y2_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,Y2)
|
|
|
|
|
#define Y2_DIR_READ (stepperY2.getStatus() & STATUS_DIR)
|
|
|
|
|
#define Y2_DIR_READ() (stepperY2.getStatus() & STATUS_DIR)
|
|
|
|
|
#else
|
|
|
|
|
#if AXIS_IS_TMC(Y2)
|
|
|
|
|
extern TMC_CLASS(Y2, Y) stepperY2;
|
|
|
|
@ -262,19 +262,19 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern TMC26XStepper stepperY2;
|
|
|
|
|
#define Y2_ENABLE_INIT NOOP
|
|
|
|
|
#define Y2_ENABLE_WRITE(STATE) stepperY2.setEnabled(STATE)
|
|
|
|
|
#define Y2_ENABLE_READ stepperY2.isEnabled()
|
|
|
|
|
#define Y2_ENABLE_READ() stepperY2.isEnabled()
|
|
|
|
|
#elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y2)
|
|
|
|
|
#define Y2_ENABLE_INIT NOOP
|
|
|
|
|
#define Y2_ENABLE_WRITE(STATE) stepperY2.toff((STATE)==Y_ENABLE_ON ? chopper_timing.toff : 0)
|
|
|
|
|
#define Y2_ENABLE_READ stepperY2.isEnabled()
|
|
|
|
|
#define Y2_ENABLE_READ() stepperY2.isEnabled()
|
|
|
|
|
#else
|
|
|
|
|
#define Y2_ENABLE_INIT SET_OUTPUT(Y2_ENABLE_PIN)
|
|
|
|
|
#define Y2_ENABLE_WRITE(STATE) WRITE(Y2_ENABLE_PIN,STATE)
|
|
|
|
|
#define Y2_ENABLE_READ READ(Y2_ENABLE_PIN)
|
|
|
|
|
#define Y2_ENABLE_READ() READ(Y2_ENABLE_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define Y2_DIR_INIT SET_OUTPUT(Y2_DIR_PIN)
|
|
|
|
|
#define Y2_DIR_WRITE(STATE) WRITE(Y2_DIR_PIN,STATE)
|
|
|
|
|
#define Y2_DIR_READ READ(Y2_DIR_PIN)
|
|
|
|
|
#define Y2_DIR_READ() READ(Y2_DIR_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define Y2_STEP_INIT SET_OUTPUT(Y2_STEP_PIN)
|
|
|
|
|
#if AXIS_HAS_SQUARE_WAVE(Y2)
|
|
|
|
@ -294,10 +294,10 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern L6470 stepperZ2;
|
|
|
|
|
#define Z2_ENABLE_INIT NOOP
|
|
|
|
|
#define Z2_ENABLE_WRITE(STATE) NOOP
|
|
|
|
|
#define Z2_ENABLE_READ (stepperZ2.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define Z2_ENABLE_READ() (stepperZ2.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define Z2_DIR_INIT NOOP
|
|
|
|
|
#define Z2_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,Z2)
|
|
|
|
|
#define Z2_DIR_READ (stepperZ2.getStatus() & STATUS_DIR)
|
|
|
|
|
#define Z2_DIR_READ() (stepperZ2.getStatus() & STATUS_DIR)
|
|
|
|
|
#else
|
|
|
|
|
#if AXIS_IS_TMC(Z2)
|
|
|
|
|
extern TMC_CLASS(Z2, Z) stepperZ2;
|
|
|
|
@ -306,19 +306,19 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern TMC26XStepper stepperZ2;
|
|
|
|
|
#define Z2_ENABLE_INIT NOOP
|
|
|
|
|
#define Z2_ENABLE_WRITE(STATE) stepperZ2.setEnabled(STATE)
|
|
|
|
|
#define Z2_ENABLE_READ stepperZ2.isEnabled()
|
|
|
|
|
#define Z2_ENABLE_READ() stepperZ2.isEnabled()
|
|
|
|
|
#elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2)
|
|
|
|
|
#define Z2_ENABLE_INIT NOOP
|
|
|
|
|
#define Z2_ENABLE_WRITE(STATE) stepperZ2.toff((STATE)==Z_ENABLE_ON ? chopper_timing.toff : 0)
|
|
|
|
|
#define Z2_ENABLE_READ stepperZ2.isEnabled()
|
|
|
|
|
#define Z2_ENABLE_READ() stepperZ2.isEnabled()
|
|
|
|
|
#else
|
|
|
|
|
#define Z2_ENABLE_INIT SET_OUTPUT(Z2_ENABLE_PIN)
|
|
|
|
|
#define Z2_ENABLE_WRITE(STATE) WRITE(Z2_ENABLE_PIN,STATE)
|
|
|
|
|
#define Z2_ENABLE_READ READ(Z2_ENABLE_PIN)
|
|
|
|
|
#define Z2_ENABLE_READ() READ(Z2_ENABLE_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define Z2_DIR_INIT SET_OUTPUT(Z2_DIR_PIN)
|
|
|
|
|
#define Z2_DIR_WRITE(STATE) WRITE(Z2_DIR_PIN,STATE)
|
|
|
|
|
#define Z2_DIR_READ READ(Z2_DIR_PIN)
|
|
|
|
|
#define Z2_DIR_READ() READ(Z2_DIR_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define Z2_STEP_INIT SET_OUTPUT(Z2_STEP_PIN)
|
|
|
|
|
#if AXIS_HAS_SQUARE_WAVE(Z2)
|
|
|
|
@ -338,10 +338,10 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern L6470 stepperZ3;
|
|
|
|
|
#define Z3_ENABLE_INIT NOOP
|
|
|
|
|
#define Z3_ENABLE_WRITE(STATE) NOOP
|
|
|
|
|
#define Z3_ENABLE_READ (stepperZ3.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define Z3_ENABLE_READ() (stepperZ3.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define Z3_DIR_INIT NOOP
|
|
|
|
|
#define Z3_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,Z3)
|
|
|
|
|
#define Z3_DIR_READ (stepperZ3.getStatus() & STATUS_DIR)
|
|
|
|
|
#define Z3_DIR_READ() (stepperZ3.getStatus() & STATUS_DIR)
|
|
|
|
|
#else
|
|
|
|
|
#if AXIS_IS_TMC(Z3)
|
|
|
|
|
extern TMC_CLASS(Z3, Z) stepperZ3;
|
|
|
|
@ -350,19 +350,19 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern TMC26XStepper stepperZ3;
|
|
|
|
|
#define Z3_ENABLE_INIT NOOP
|
|
|
|
|
#define Z3_ENABLE_WRITE(STATE) stepperZ3.setEnabled(STATE)
|
|
|
|
|
#define Z3_ENABLE_READ stepperZ3.isEnabled()
|
|
|
|
|
#define Z3_ENABLE_READ() stepperZ3.isEnabled()
|
|
|
|
|
#elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z3)
|
|
|
|
|
#define Z3_ENABLE_INIT NOOP
|
|
|
|
|
#define Z3_ENABLE_WRITE(STATE) stepperZ3.toff((STATE)==Z_ENABLE_ON ? chopper_timing.toff : 0)
|
|
|
|
|
#define Z3_ENABLE_READ stepperZ3.isEnabled()
|
|
|
|
|
#define Z3_ENABLE_READ() stepperZ3.isEnabled()
|
|
|
|
|
#else
|
|
|
|
|
#define Z3_ENABLE_INIT SET_OUTPUT(Z3_ENABLE_PIN)
|
|
|
|
|
#define Z3_ENABLE_WRITE(STATE) WRITE(Z3_ENABLE_PIN,STATE)
|
|
|
|
|
#define Z3_ENABLE_READ READ(Z3_ENABLE_PIN)
|
|
|
|
|
#define Z3_ENABLE_READ() READ(Z3_ENABLE_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define Z3_DIR_INIT SET_OUTPUT(Z3_DIR_PIN)
|
|
|
|
|
#define Z3_DIR_WRITE(STATE) WRITE(Z3_DIR_PIN,STATE)
|
|
|
|
|
#define Z3_DIR_READ READ(Z3_DIR_PIN)
|
|
|
|
|
#define Z3_DIR_READ() READ(Z3_DIR_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define Z3_STEP_INIT SET_OUTPUT(Z3_STEP_PIN)
|
|
|
|
|
#if AXIS_HAS_SQUARE_WAVE(Z3)
|
|
|
|
@ -381,10 +381,10 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern L6470 stepperE0;
|
|
|
|
|
#define E0_ENABLE_INIT NOOP
|
|
|
|
|
#define E0_ENABLE_WRITE(STATE) NOOP
|
|
|
|
|
#define E0_ENABLE_READ (stepperE0.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define E0_ENABLE_READ() (stepperE0.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define E0_DIR_INIT NOOP
|
|
|
|
|
#define E0_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,E0)
|
|
|
|
|
#define E0_DIR_READ (stepperE0.getStatus() & STATUS_DIR)
|
|
|
|
|
#define E0_DIR_READ() (stepperE0.getStatus() & STATUS_DIR)
|
|
|
|
|
#else
|
|
|
|
|
#if AXIS_IS_TMC(E0)
|
|
|
|
|
extern TMC_CLASS_E(0) stepperE0;
|
|
|
|
@ -393,19 +393,19 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern TMC26XStepper stepperE0;
|
|
|
|
|
#define E0_ENABLE_INIT NOOP
|
|
|
|
|
#define E0_ENABLE_WRITE(STATE) stepperE0.setEnabled(STATE)
|
|
|
|
|
#define E0_ENABLE_READ stepperE0.isEnabled()
|
|
|
|
|
#define E0_ENABLE_READ() stepperE0.isEnabled()
|
|
|
|
|
#elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E0)
|
|
|
|
|
#define E0_ENABLE_INIT NOOP
|
|
|
|
|
#define E0_ENABLE_WRITE(STATE) stepperE0.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0)
|
|
|
|
|
#define E0_ENABLE_READ stepperE0.isEnabled()
|
|
|
|
|
#define E0_ENABLE_READ() stepperE0.isEnabled()
|
|
|
|
|
#else
|
|
|
|
|
#define E0_ENABLE_INIT SET_OUTPUT(E0_ENABLE_PIN)
|
|
|
|
|
#define E0_ENABLE_WRITE(STATE) WRITE(E0_ENABLE_PIN,STATE)
|
|
|
|
|
#define E0_ENABLE_READ READ(E0_ENABLE_PIN)
|
|
|
|
|
#define E0_ENABLE_READ() READ(E0_ENABLE_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define E0_DIR_INIT SET_OUTPUT(E0_DIR_PIN)
|
|
|
|
|
#define E0_DIR_WRITE(STATE) WRITE(E0_DIR_PIN,STATE)
|
|
|
|
|
#define E0_DIR_READ READ(E0_DIR_PIN)
|
|
|
|
|
#define E0_DIR_READ() READ(E0_DIR_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define E0_STEP_INIT SET_OUTPUT(E0_STEP_PIN)
|
|
|
|
|
#if AXIS_HAS_SQUARE_WAVE(E0)
|
|
|
|
@ -420,10 +420,10 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern L6470 stepperE1;
|
|
|
|
|
#define E1_ENABLE_INIT NOOP
|
|
|
|
|
#define E1_ENABLE_WRITE(STATE) NOOP
|
|
|
|
|
#define E1_ENABLE_READ (stepperE1.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define E1_ENABLE_READ() (stepperE1.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define E1_DIR_INIT NOOP
|
|
|
|
|
#define E1_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,E1)
|
|
|
|
|
#define E1_DIR_READ (stepperE1.getStatus() & STATUS_DIR)
|
|
|
|
|
#define E1_DIR_READ() (stepperE1.getStatus() & STATUS_DIR)
|
|
|
|
|
#else
|
|
|
|
|
#if AXIS_IS_TMC(E1)
|
|
|
|
|
extern TMC_CLASS_E(1) stepperE1;
|
|
|
|
@ -432,19 +432,19 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern TMC26XStepper stepperE1;
|
|
|
|
|
#define E1_ENABLE_INIT NOOP
|
|
|
|
|
#define E1_ENABLE_WRITE(STATE) stepperE1.setEnabled(STATE)
|
|
|
|
|
#define E1_ENABLE_READ stepperE1.isEnabled()
|
|
|
|
|
#define E1_ENABLE_READ() stepperE1.isEnabled()
|
|
|
|
|
#elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E1)
|
|
|
|
|
#define E1_ENABLE_INIT NOOP
|
|
|
|
|
#define E1_ENABLE_WRITE(STATE) stepperE1.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0)
|
|
|
|
|
#define E1_ENABLE_READ stepperE1.isEnabled()
|
|
|
|
|
#define E1_ENABLE_READ() stepperE1.isEnabled()
|
|
|
|
|
#else
|
|
|
|
|
#define E1_ENABLE_INIT SET_OUTPUT(E1_ENABLE_PIN)
|
|
|
|
|
#define E1_ENABLE_WRITE(STATE) WRITE(E1_ENABLE_PIN,STATE)
|
|
|
|
|
#define E1_ENABLE_READ READ(E1_ENABLE_PIN)
|
|
|
|
|
#define E1_ENABLE_READ() READ(E1_ENABLE_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define E1_DIR_INIT SET_OUTPUT(E1_DIR_PIN)
|
|
|
|
|
#define E1_DIR_WRITE(STATE) WRITE(E1_DIR_PIN,STATE)
|
|
|
|
|
#define E1_DIR_READ READ(E1_DIR_PIN)
|
|
|
|
|
#define E1_DIR_READ() READ(E1_DIR_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define E1_STEP_INIT SET_OUTPUT(E1_STEP_PIN)
|
|
|
|
|
#if AXIS_HAS_SQUARE_WAVE(E1)
|
|
|
|
@ -459,10 +459,10 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern L6470 stepperE2;
|
|
|
|
|
#define E2_ENABLE_INIT NOOP
|
|
|
|
|
#define E2_ENABLE_WRITE(STATE) NOOP
|
|
|
|
|
#define E2_ENABLE_READ (stepperE2.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define E2_ENABLE_READ() (stepperE2.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define E2_DIR_INIT NOOP
|
|
|
|
|
#define E2_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,E2)
|
|
|
|
|
#define E2_DIR_READ (stepperE2.getStatus() & STATUS_DIR)
|
|
|
|
|
#define E2_DIR_READ() (stepperE2.getStatus() & STATUS_DIR)
|
|
|
|
|
#else
|
|
|
|
|
#if AXIS_IS_TMC(E2)
|
|
|
|
|
extern TMC_CLASS_E(2) stepperE2;
|
|
|
|
@ -471,19 +471,19 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern TMC26XStepper stepperE2;
|
|
|
|
|
#define E2_ENABLE_INIT NOOP
|
|
|
|
|
#define E2_ENABLE_WRITE(STATE) stepperE2.setEnabled(STATE)
|
|
|
|
|
#define E2_ENABLE_READ stepperE2.isEnabled()
|
|
|
|
|
#define E2_ENABLE_READ() stepperE2.isEnabled()
|
|
|
|
|
#elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E2)
|
|
|
|
|
#define E2_ENABLE_INIT NOOP
|
|
|
|
|
#define E2_ENABLE_WRITE(STATE) stepperE2.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0)
|
|
|
|
|
#define E2_ENABLE_READ stepperE2.isEnabled()
|
|
|
|
|
#define E2_ENABLE_READ() stepperE2.isEnabled()
|
|
|
|
|
#else
|
|
|
|
|
#define E2_ENABLE_INIT SET_OUTPUT(E2_ENABLE_PIN)
|
|
|
|
|
#define E2_ENABLE_WRITE(STATE) WRITE(E2_ENABLE_PIN,STATE)
|
|
|
|
|
#define E2_ENABLE_READ READ(E2_ENABLE_PIN)
|
|
|
|
|
#define E2_ENABLE_READ() READ(E2_ENABLE_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define E2_DIR_INIT SET_OUTPUT(E2_DIR_PIN)
|
|
|
|
|
#define E2_DIR_WRITE(STATE) WRITE(E2_DIR_PIN,STATE)
|
|
|
|
|
#define E2_DIR_READ READ(E2_DIR_PIN)
|
|
|
|
|
#define E2_DIR_READ() READ(E2_DIR_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define E2_STEP_INIT SET_OUTPUT(E2_STEP_PIN)
|
|
|
|
|
#if AXIS_HAS_SQUARE_WAVE(E2)
|
|
|
|
@ -498,10 +498,10 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern L6470 stepperE3;
|
|
|
|
|
#define E3_ENABLE_INIT NOOP
|
|
|
|
|
#define E3_ENABLE_WRITE(STATE) NOOP
|
|
|
|
|
#define E3_ENABLE_READ (stepperE3.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define E3_ENABLE_READ() (stepperE3.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define E3_DIR_INIT NOOP
|
|
|
|
|
#define E3_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,E3)
|
|
|
|
|
#define E3_DIR_READ (stepperE3.getStatus() & STATUS_DIR)
|
|
|
|
|
#define E3_DIR_READ() (stepperE3.getStatus() & STATUS_DIR)
|
|
|
|
|
#else
|
|
|
|
|
#if AXIS_IS_TMC(E3)
|
|
|
|
|
extern TMC_CLASS_E(3) stepperE3;
|
|
|
|
@ -510,19 +510,19 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern TMC26XStepper stepperE3;
|
|
|
|
|
#define E3_ENABLE_INIT NOOP
|
|
|
|
|
#define E3_ENABLE_WRITE(STATE) stepperE3.setEnabled(STATE)
|
|
|
|
|
#define E3_ENABLE_READ stepperE3.isEnabled()
|
|
|
|
|
#define E3_ENABLE_READ() stepperE3.isEnabled()
|
|
|
|
|
#elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E3)
|
|
|
|
|
#define E3_ENABLE_INIT NOOP
|
|
|
|
|
#define E3_ENABLE_WRITE(STATE) stepperE3.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0)
|
|
|
|
|
#define E3_ENABLE_READ stepperE3.isEnabled()
|
|
|
|
|
#define E3_ENABLE_READ() stepperE3.isEnabled()
|
|
|
|
|
#else
|
|
|
|
|
#define E3_ENABLE_INIT SET_OUTPUT(E3_ENABLE_PIN)
|
|
|
|
|
#define E3_ENABLE_WRITE(STATE) WRITE(E3_ENABLE_PIN,STATE)
|
|
|
|
|
#define E3_ENABLE_READ READ(E3_ENABLE_PIN)
|
|
|
|
|
#define E3_ENABLE_READ() READ(E3_ENABLE_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define E3_DIR_INIT SET_OUTPUT(E3_DIR_PIN)
|
|
|
|
|
#define E3_DIR_WRITE(STATE) WRITE(E3_DIR_PIN,STATE)
|
|
|
|
|
#define E3_DIR_READ READ(E3_DIR_PIN)
|
|
|
|
|
#define E3_DIR_READ() READ(E3_DIR_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define E3_STEP_INIT SET_OUTPUT(E3_STEP_PIN)
|
|
|
|
|
#if AXIS_HAS_SQUARE_WAVE(E3)
|
|
|
|
@ -537,10 +537,10 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern L6470 stepperE4;
|
|
|
|
|
#define E4_ENABLE_INIT NOOP
|
|
|
|
|
#define E4_ENABLE_WRITE(STATE) NOOP
|
|
|
|
|
#define E4_ENABLE_READ (stepperE4.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define E4_ENABLE_READ() (stepperE4.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define E4_DIR_INIT NOOP
|
|
|
|
|
#define E4_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,E4)
|
|
|
|
|
#define E4_DIR_READ (stepperE4.getStatus() & STATUS_DIR)
|
|
|
|
|
#define E4_DIR_READ() (stepperE4.getStatus() & STATUS_DIR)
|
|
|
|
|
#else
|
|
|
|
|
#if AXIS_IS_TMC(E4)
|
|
|
|
|
extern TMC_CLASS_E(4) stepperE4;
|
|
|
|
@ -549,19 +549,19 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern TMC26XStepper stepperE4;
|
|
|
|
|
#define E4_ENABLE_INIT NOOP
|
|
|
|
|
#define E4_ENABLE_WRITE(STATE) stepperE4.setEnabled(STATE)
|
|
|
|
|
#define E4_ENABLE_READ stepperE4.isEnabled()
|
|
|
|
|
#define E4_ENABLE_READ() stepperE4.isEnabled()
|
|
|
|
|
#elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E4)
|
|
|
|
|
#define E4_ENABLE_INIT NOOP
|
|
|
|
|
#define E4_ENABLE_WRITE(STATE) stepperE4.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0)
|
|
|
|
|
#define E4_ENABLE_READ stepperE4.isEnabled()
|
|
|
|
|
#define E4_ENABLE_READ() stepperE4.isEnabled()
|
|
|
|
|
#else
|
|
|
|
|
#define E4_ENABLE_INIT SET_OUTPUT(E4_ENABLE_PIN)
|
|
|
|
|
#define E4_ENABLE_WRITE(STATE) WRITE(E4_ENABLE_PIN,STATE)
|
|
|
|
|
#define E4_ENABLE_READ READ(E4_ENABLE_PIN)
|
|
|
|
|
#define E4_ENABLE_READ() READ(E4_ENABLE_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define E4_DIR_INIT SET_OUTPUT(E4_DIR_PIN)
|
|
|
|
|
#define E4_DIR_WRITE(STATE) WRITE(E4_DIR_PIN,STATE)
|
|
|
|
|
#define E4_DIR_READ READ(E4_DIR_PIN)
|
|
|
|
|
#define E4_DIR_READ() READ(E4_DIR_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define E4_STEP_INIT SET_OUTPUT(E4_STEP_PIN)
|
|
|
|
|
#if AXIS_HAS_SQUARE_WAVE(E4)
|
|
|
|
@ -576,10 +576,10 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern L6470 stepperE5;
|
|
|
|
|
#define E5_ENABLE_INIT NOOP
|
|
|
|
|
#define E5_ENABLE_WRITE(STATE) NOOP
|
|
|
|
|
#define E5_ENABLE_READ (stepperE5.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define E5_ENABLE_READ() (stepperE5.getStatus() & STATUS_HIZ)
|
|
|
|
|
#define E5_DIR_INIT NOOP
|
|
|
|
|
#define E5_DIR_WRITE(STATE) L6470_WRITE_DIR_COMMAND(STATE,E5)
|
|
|
|
|
#define E5_DIR_READ (stepperE5.getStatus() & STATUS_DIR)
|
|
|
|
|
#define E5_DIR_READ() (stepperE5.getStatus() & STATUS_DIR)
|
|
|
|
|
#else
|
|
|
|
|
#if AXIS_IS_TMC(E5)
|
|
|
|
|
extern TMC_CLASS_E(5) stepperE5;
|
|
|
|
@ -588,19 +588,19 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|
|
|
|
extern TMC26XStepper stepperE5;
|
|
|
|
|
#define E5_ENABLE_INIT NOOP
|
|
|
|
|
#define E5_ENABLE_WRITE(STATE) stepperE5.setEnabled(STATE)
|
|
|
|
|
#define E5_ENABLE_READ stepperE5.isEnabled()
|
|
|
|
|
#define E5_ENABLE_READ() stepperE5.isEnabled()
|
|
|
|
|
#elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E5)
|
|
|
|
|
#define E5_ENABLE_INIT NOOP
|
|
|
|
|
#define E5_ENABLE_WRITE(STATE) stepperE5.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0)
|
|
|
|
|
#define E5_ENABLE_READ stepperE5.isEnabled()
|
|
|
|
|
#define E5_ENABLE_READ() stepperE5.isEnabled()
|
|
|
|
|
#else
|
|
|
|
|
#define E5_ENABLE_INIT SET_OUTPUT(E5_ENABLE_PIN)
|
|
|
|
|
#define E5_ENABLE_WRITE(STATE) WRITE(E5_ENABLE_PIN,STATE)
|
|
|
|
|
#define E5_ENABLE_READ READ(E5_ENABLE_PIN)
|
|
|
|
|
#define E5_ENABLE_READ() READ(E5_ENABLE_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define E5_DIR_INIT SET_OUTPUT(E5_DIR_PIN)
|
|
|
|
|
#define E5_DIR_WRITE(STATE) WRITE(E5_DIR_PIN,STATE)
|
|
|
|
|
#define E5_DIR_READ READ(E5_DIR_PIN)
|
|
|
|
|
#define E5_DIR_READ() READ(E5_DIR_PIN)
|
|
|
|
|
#endif
|
|
|
|
|
#define E5_STEP_INIT SET_OUTPUT(E5_STEP_PIN)
|
|
|
|
|
#if AXIS_HAS_SQUARE_WAVE(E5)
|
|
|
|
|