No need to set input after attachInterrupt
This commit is contained in:
parent
e0276d2f32
commit
cf53e502a2
3 changed files with 0 additions and 27 deletions
|
@ -57,39 +57,30 @@ void endstop_ISR(void) { endstops.check_possible_change(); }
|
|||
void setup_endstop_interrupts(void) {
|
||||
#if HAS_X_MAX
|
||||
attachInterrupt(X_MAX_PIN, endstop_ISR, CHANGE); // assign it
|
||||
SET_INPUT(X_MAX_PIN);
|
||||
#endif
|
||||
#if HAS_X_MIN
|
||||
attachInterrupt(X_MIN_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(X_MIN_PIN);
|
||||
#endif
|
||||
#if HAS_Y_MAX
|
||||
attachInterrupt(Y_MAX_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(Y_MAX_PIN);
|
||||
#endif
|
||||
#if HAS_Y_MIN
|
||||
attachInterrupt(Y_MIN_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(Y_MIN_PIN);
|
||||
#endif
|
||||
#if HAS_Z_MAX
|
||||
attachInterrupt(Z_MAX_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(Z_MAX_PIN);
|
||||
#endif
|
||||
#if HAS_Z_MIN
|
||||
attachInterrupt(Z_MIN_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(Z_MIN_PIN);
|
||||
#endif
|
||||
#if HAS_Z2_MAX
|
||||
attachInterrupt(Z2_MAX_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(Z2_MAX_PIN);
|
||||
#endif
|
||||
#if HAS_Z2_MIN
|
||||
attachInterrupt(Z2_MIN_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(Z2_MIN_PIN);
|
||||
#endif
|
||||
#if HAS_Z_MIN_PROBE_PIN
|
||||
attachInterrupt(Z_MIN_PROBE_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(Z_MIN_PROBE_PIN);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -32,39 +32,30 @@ void endstop_ISR(void) { endstops.check_possible_change(); }
|
|||
void setup_endstop_interrupts(void) {
|
||||
#if HAS_X_MAX
|
||||
attachInterrupt(X_MAX_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(X_MAX_PIN);
|
||||
#endif
|
||||
#if HAS_X_MIN
|
||||
attachInterrupt(X_MIN_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(X_MIN_PIN);
|
||||
#endif
|
||||
#if HAS_Y_MAX
|
||||
attachInterrupt(Y_MAX_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(Y_MAX_PIN);
|
||||
#endif
|
||||
#if HAS_Y_MIN
|
||||
attachInterrupt(Y_MIN_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(Y_MIN_PIN);
|
||||
#endif
|
||||
#if HAS_Z_MAX
|
||||
attachInterrupt(Z_MAX_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(Z_MAX_PIN);
|
||||
#endif
|
||||
#if HAS_Z_MIN
|
||||
attachInterrupt(Z_MIN_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(Z_MIN_PIN);
|
||||
#endif
|
||||
#if HAS_Z2_MAX
|
||||
attachInterrupt(Z2_MAX_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(Z2_MAX_PIN);
|
||||
#endif
|
||||
#if HAS_Z2_MIN
|
||||
attachInterrupt(Z2_MIN_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(Z2_MIN_PIN);
|
||||
#endif
|
||||
#if HAS_Z_MIN_PROBE_PIN
|
||||
attachInterrupt(Z_MIN_PROBE_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(Z_MIN_PROBE_PIN);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -34,39 +34,30 @@ void endstop_ISR(void) { endstops.check_possible_change(); }
|
|||
void setup_endstop_interrupts(void) {
|
||||
#if HAS_X_MAX
|
||||
attachInterrupt(X_MAX_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(X_MAX_PIN);
|
||||
#endif
|
||||
#if HAS_X_MIN
|
||||
attachInterrupt(X_MIN_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(X_MIN_PIN);
|
||||
#endif
|
||||
#if HAS_Y_MAX
|
||||
attachInterrupt(Y_MAX_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(Y_MAX_PIN);
|
||||
#endif
|
||||
#if HAS_Y_MIN
|
||||
attachInterrupt(Y_MIN_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(Y_MIN_PIN);
|
||||
#endif
|
||||
#if HAS_Z_MAX
|
||||
attachInterrupt(Z_MAX_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(Z_MAX_PIN);
|
||||
#endif
|
||||
#if HAS_Z_MIN
|
||||
attachInterrupt(Z_MIN_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(Z_MIN_PIN);
|
||||
#endif
|
||||
#if HAS_Z2_MAX
|
||||
attachInterrupt(Z2_MAX_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(Z2_MAX_PIN);
|
||||
#endif
|
||||
#if HAS_Z2_MIN
|
||||
attachInterrupt(Z2_MIN_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(Z2_MIN_PIN);
|
||||
#endif
|
||||
#if HAS_Z_MIN_PROBE_PIN
|
||||
attachInterrupt(Z_MIN_PROBE_PIN, endstop_ISR, CHANGE);
|
||||
SET_INPUT(Z_MIN_PROBE_PIN);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue