From cf53e502a21f2927a128054de1f86d9e6615230c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 12 Jun 2018 18:43:05 -0500 Subject: [PATCH] No need to set input after attachInterrupt --- Marlin/src/HAL/HAL_STM32F1/endstop_interrupts.h | 9 --------- Marlin/src/HAL/HAL_STM32F4/endstop_interrupts.h | 9 --------- Marlin/src/HAL/HAL_STM32F7/endstop_interrupts.h | 9 --------- 3 files changed, 27 deletions(-) diff --git a/Marlin/src/HAL/HAL_STM32F1/endstop_interrupts.h b/Marlin/src/HAL/HAL_STM32F1/endstop_interrupts.h index 3d64e541d..c2a07a7cf 100644 --- a/Marlin/src/HAL/HAL_STM32F1/endstop_interrupts.h +++ b/Marlin/src/HAL/HAL_STM32F1/endstop_interrupts.h @@ -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 } diff --git a/Marlin/src/HAL/HAL_STM32F4/endstop_interrupts.h b/Marlin/src/HAL/HAL_STM32F4/endstop_interrupts.h index 64e67afc5..1b1cffc49 100644 --- a/Marlin/src/HAL/HAL_STM32F4/endstop_interrupts.h +++ b/Marlin/src/HAL/HAL_STM32F4/endstop_interrupts.h @@ -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 } diff --git a/Marlin/src/HAL/HAL_STM32F7/endstop_interrupts.h b/Marlin/src/HAL/HAL_STM32F7/endstop_interrupts.h index de5641268..5ae338d76 100644 --- a/Marlin/src/HAL/HAL_STM32F7/endstop_interrupts.h +++ b/Marlin/src/HAL/HAL_STM32F7/endstop_interrupts.h @@ -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 }