|
@ -43,44 +43,40 @@ |
|
|
void endstop_ISR(void) { endstops.update(); } |
|
|
void endstop_ISR(void) { endstops.update(); } |
|
|
|
|
|
|
|
|
/**
|
|
|
/**
|
|
|
* Endstop interrupts for Due based targets. |
|
|
* Endstop interrupts for Due based targets. |
|
|
* On Due, all pins support external interrupt capability. |
|
|
* On Due, all pins support external interrupt capability. |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
void setup_endstop_interrupts( void ) { |
|
|
void setup_endstop_interrupts( void ) { |
|
|
|
|
|
|
|
|
#if HAS_X_MAX |
|
|
#if HAS_X_MAX |
|
|
attachInterrupt(digitalPinToInterrupt(X_MAX_PIN), endstop_ISR, CHANGE); // assign it
|
|
|
attachInterrupt(digitalPinToInterrupt(X_MAX_PIN), endstop_ISR, CHANGE); // assign it
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if HAS_X_MIN |
|
|
#if HAS_X_MIN |
|
|
attachInterrupt(digitalPinToInterrupt(X_MIN_PIN), endstop_ISR, CHANGE); |
|
|
attachInterrupt(digitalPinToInterrupt(X_MIN_PIN), endstop_ISR, CHANGE); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if HAS_Y_MAX |
|
|
#if HAS_Y_MAX |
|
|
attachInterrupt(digitalPinToInterrupt(Y_MAX_PIN), endstop_ISR, CHANGE); |
|
|
attachInterrupt(digitalPinToInterrupt(Y_MAX_PIN), endstop_ISR, CHANGE); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if HAS_Y_MIN |
|
|
#if HAS_Y_MIN |
|
|
attachInterrupt(digitalPinToInterrupt(Y_MIN_PIN), endstop_ISR, CHANGE); |
|
|
attachInterrupt(digitalPinToInterrupt(Y_MIN_PIN), endstop_ISR, CHANGE); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if HAS_Z_MAX |
|
|
#if HAS_Z_MAX |
|
|
attachInterrupt(digitalPinToInterrupt(Z_MAX_PIN), endstop_ISR, CHANGE); |
|
|
attachInterrupt(digitalPinToInterrupt(Z_MAX_PIN), endstop_ISR, CHANGE); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if HAS_Z_MIN |
|
|
#if HAS_Z_MIN |
|
|
attachInterrupt(digitalPinToInterrupt(Z_MIN_PIN), endstop_ISR, CHANGE); |
|
|
attachInterrupt(digitalPinToInterrupt(Z_MIN_PIN), endstop_ISR, CHANGE); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if HAS_Z2_MAX |
|
|
#if HAS_Z2_MAX |
|
|
attachInterrupt(digitalPinToInterrupt(Z2_MAX_PIN), endstop_ISR, CHANGE); |
|
|
attachInterrupt(digitalPinToInterrupt(Z2_MAX_PIN), endstop_ISR, CHANGE); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if HAS_Z2_MIN |
|
|
#if HAS_Z2_MIN |
|
|
attachInterrupt(digitalPinToInterrupt(Z2_MIN_PIN), endstop_ISR, CHANGE); |
|
|
attachInterrupt(digitalPinToInterrupt(Z2_MIN_PIN), endstop_ISR, CHANGE); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
#if HAS_Z3_MAX |
|
|
|
|
|
attachInterrupt(digitalPinToInterrupt(Z3_MAX_PIN), endstop_ISR, CHANGE); |
|
|
|
|
|
#endif |
|
|
|
|
|
#if HAS_Z3_MIN |
|
|
|
|
|
attachInterrupt(digitalPinToInterrupt(Z3_MIN_PIN), endstop_ISR, CHANGE); |
|
|
|
|
|
#endif |
|
|
#if HAS_Z_MIN_PROBE_PIN |
|
|
#if HAS_Z_MIN_PROBE_PIN |
|
|
attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_PIN), endstop_ISR, CHANGE); |
|
|
attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_PIN), endstop_ISR, CHANGE); |
|
|
#endif |
|
|
#endif |
|
|