Add support for Triple-Z steppers/endstops
This commit is contained in:
committed by
Scott Lahteine
parent
bc06406d7d
commit
1a6f2b29b8
@ -106,6 +106,7 @@
|
||||
|| defined(Y2_HARDWARE_SERIAL) \
|
||||
|| defined(Z_HARDWARE_SERIAL ) \
|
||||
|| defined(Z2_HARDWARE_SERIAL) \
|
||||
|| defined(Z3_HARDWARE_SERIAL) \
|
||||
|| defined(E0_HARDWARE_SERIAL) \
|
||||
|| defined(E1_HARDWARE_SERIAL) \
|
||||
|| defined(E2_HARDWARE_SERIAL) \
|
||||
|
@ -225,6 +225,26 @@ void setup_endstop_interrupts( void ) {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_Z3_MAX
|
||||
#if (digitalPinToInterrupt(Z3_MAX_PIN) != NOT_AN_INTERRUPT)
|
||||
attachInterrupt(digitalPinToInterrupt(Z3_MAX_PIN), endstop_ISR, CHANGE);
|
||||
#else
|
||||
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
|
||||
static_assert(digitalPinToPCICR(Z3_MAX_PIN) != NULL, "Z3_MAX_PIN is not interrupt-capable");
|
||||
pciSetup(Z3_MAX_PIN);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_Z3_MIN
|
||||
#if (digitalPinToInterrupt(Z3_MIN_PIN) != NOT_AN_INTERRUPT)
|
||||
attachInterrupt(digitalPinToInterrupt(Z3_MIN_PIN), endstop_ISR, CHANGE);
|
||||
#else
|
||||
// Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
|
||||
static_assert(digitalPinToPCICR(Z3_MIN_PIN) != NULL, "Z3_MIN_PIN is not interrupt-capable");
|
||||
pciSetup(Z3_MIN_PIN);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_Z_MIN_PROBE_PIN
|
||||
#if (digitalPinToInterrupt(Z_MIN_PROBE_PIN) != NOT_AN_INTERRUPT)
|
||||
attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_PIN), endstop_ISR, CHANGE);
|
||||
|
Reference in New Issue
Block a user