|
@ -861,10 +861,6 @@ void Endstops::update() { |
|
|
|
|
|
|
|
|
#if ENABLED(SPI_ENDSTOPS) |
|
|
#if ENABLED(SPI_ENDSTOPS) |
|
|
|
|
|
|
|
|
#define X_STOP (X_HOME_DIR < 0 ? X_MIN : X_MAX) |
|
|
|
|
|
#define Y_STOP (Y_HOME_DIR < 0 ? Y_MIN : Y_MAX) |
|
|
|
|
|
#define Z_STOP (Z_HOME_DIR < 0 ? Z_MIN : Z_MAX) |
|
|
|
|
|
|
|
|
|
|
|
bool Endstops::tmc_spi_homing_check() { |
|
|
bool Endstops::tmc_spi_homing_check() { |
|
|
bool hit = false; |
|
|
bool hit = false; |
|
|
#if X_SPI_SENSORLESS |
|
|
#if X_SPI_SENSORLESS |
|
@ -875,7 +871,7 @@ void Endstops::update() { |
|
|
|| stepperZ.test_stall_status() |
|
|
|| stepperZ.test_stall_status() |
|
|
#endif |
|
|
#endif |
|
|
)) { |
|
|
)) { |
|
|
SBI(live_state, X_STOP); |
|
|
SBI(live_state, X_ENDSTOP); |
|
|
hit = true; |
|
|
hit = true; |
|
|
} |
|
|
} |
|
|
#endif |
|
|
#endif |
|
@ -887,7 +883,7 @@ void Endstops::update() { |
|
|
|| stepperZ.test_stall_status() |
|
|
|| stepperZ.test_stall_status() |
|
|
#endif |
|
|
#endif |
|
|
)) { |
|
|
)) { |
|
|
SBI(live_state, Y_STOP); |
|
|
SBI(live_state, Y_ENDSTOP); |
|
|
hit = true; |
|
|
hit = true; |
|
|
} |
|
|
} |
|
|
#endif |
|
|
#endif |
|
@ -899,7 +895,7 @@ void Endstops::update() { |
|
|
|| stepperY.test_stall_status() |
|
|
|| stepperY.test_stall_status() |
|
|
#endif |
|
|
#endif |
|
|
)) { |
|
|
)) { |
|
|
SBI(live_state, Z_STOP); |
|
|
SBI(live_state, Z_ENDSTOP); |
|
|
hit = true; |
|
|
hit = true; |
|
|
} |
|
|
} |
|
|
#endif |
|
|
#endif |
|
@ -907,9 +903,9 @@ void Endstops::update() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Endstops::clear_endstop_state() { |
|
|
void Endstops::clear_endstop_state() { |
|
|
TERN_(X_SPI_SENSORLESS, CBI(live_state, X_STOP)); |
|
|
TERN_(X_SPI_SENSORLESS, CBI(live_state, X_ENDSTOP)); |
|
|
TERN_(Y_SPI_SENSORLESS, CBI(live_state, Y_STOP)); |
|
|
TERN_(Y_SPI_SENSORLESS, CBI(live_state, Y_ENDSTOP)); |
|
|
TERN_(Z_SPI_SENSORLESS, CBI(live_state, Z_STOP)); |
|
|
TERN_(Z_SPI_SENSORLESS, CBI(live_state, Z_ENDSTOP)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#endif // SPI_ENDSTOPS
|
|
|
#endif // SPI_ENDSTOPS
|
|
|