From 467ab74523087a852ab50939d86a0ca0b78f17ad Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 26 Apr 2023 14:56:23 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Simplify=20?= =?UTF-8?q?endstops=20config=20(#25748)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 22 - Marlin/Configuration_adv.h | 12 +- Marlin/src/HAL/AVR/endstop_interrupts.h | 26 +- Marlin/src/HAL/DUE/endstop_interrupts.h | 56 +- Marlin/src/HAL/ESP32/endstop_interrupts.h | 56 +- Marlin/src/HAL/LPC1768/endstop_interrupts.h | 50 +- Marlin/src/HAL/SAMD21/endstop_interrupts.h | 130 ++- Marlin/src/HAL/SAMD51/endstop_interrupts.h | 106 +- Marlin/src/HAL/STM32/endstop_interrupts.h | 56 +- Marlin/src/HAL/STM32F1/endstop_interrupts.h | 56 +- .../src/HAL/TEENSY31_32/endstop_interrupts.h | 56 +- .../src/HAL/TEENSY35_36/endstop_interrupts.h | 56 +- .../src/HAL/TEENSY40_41/endstop_interrupts.h | 50 +- Marlin/src/core/macros.h | 45 - Marlin/src/inc/Changes.h | 16 +- Marlin/src/inc/Conditionals_post.h | 404 ++++---- Marlin/src/inc/SanityCheck.h | 146 +-- Marlin/src/inc/Warnings.cpp | 778 +++++++-------- Marlin/src/lcd/e3v2/proui/endstop_diag.cpp | 12 +- .../generic/endstop_state_screen.cpp | 2 +- Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp | 24 +- Marlin/src/module/endstops.cpp | 8 +- Marlin/src/pins/pins.h | 51 + Marlin/src/pins/pins_postprocess.h | 910 +++--------------- Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h | 1 + Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h | 1 + Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h | 6 +- Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h | 20 +- .../pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 23 +- Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h | 25 +- .../pins/stm32g0/pins_BTT_MANTA_M8P_common.h | 18 +- .../pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h | 23 +- buildroot/tests/DUE | 2 +- buildroot/tests/FYSETC_F6 | 4 +- buildroot/tests/LPC1769 | 4 +- buildroot/tests/mega1280 | 2 +- buildroot/tests/rambo | 7 +- buildroot/tests/teensy31 | 1 - buildroot/tests/teensy35 | 4 +- buildroot/tests/teensy41 | 4 +- 40 files changed, 1286 insertions(+), 1987 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 1251a99a34..33b661e3c8 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1087,28 +1087,6 @@ // @section endstops -// Specify here all the endstop connectors that are connected to any endstop or probe. -// Almost all printers will be using one per axis. Probes will use one or more of the -// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. -#define USE_XMIN_PLUG -#define USE_YMIN_PLUG -#define USE_ZMIN_PLUG -//#define USE_IMIN_PLUG -//#define USE_JMIN_PLUG -//#define USE_KMIN_PLUG -//#define USE_UMIN_PLUG -//#define USE_VMIN_PLUG -//#define USE_WMIN_PLUG -//#define USE_XMAX_PLUG -//#define USE_YMAX_PLUG -//#define USE_ZMAX_PLUG -//#define USE_IMAX_PLUG -//#define USE_JMAX_PLUG -//#define USE_KMAX_PLUG -//#define USE_UMAX_PLUG -//#define USE_VMAX_PLUG -//#define USE_WMAX_PLUG - // Enable pullup for all endstops to prevent a floating state #define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index f0c4975d5d..5eb709f704 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -849,13 +849,13 @@ * Get the offset by homing X and measuring the error. * Also set with 'M666 X' and stored to EEPROM with 'M500'. * - * - Use X2_USE_ENDSTOP to set the endstop plug by name. (_XMIN_, _XMAX_, _YMIN_, _YMAX_, _ZMIN_, _ZMAX_) + * - Define the extra endstop pins here to override defaults. No auto-assignment. */ #if HAS_X2_STEPPER && DISABLED(DUAL_X_CARRIAGE) //#define INVERT_X2_VS_X_DIR // X2 direction signal is the opposite of X //#define X_DUAL_ENDSTOPS // X2 has its own endstop #if ENABLED(X_DUAL_ENDSTOPS) - #define X2_USE_ENDSTOP _XMAX_ // X2 endstop board plug. Don't forget to enable USE_*_PLUG. + //#define X2_STOP_PIN X_MAX_PIN // X2 endstop pin override #define X2_ENDSTOP_ADJUSTMENT 0 // X2 offset relative to X endstop #endif #endif @@ -864,7 +864,7 @@ //#define INVERT_Y2_VS_Y_DIR // Y2 direction signal is the opposite of Y //#define Y_DUAL_ENDSTOPS // Y2 has its own endstop #if ENABLED(Y_DUAL_ENDSTOPS) - #define Y2_USE_ENDSTOP _YMAX_ // Y2 endstop board plug. Don't forget to enable USE_*_PLUG. + //#define Y2_STOP_PIN Y_MAX_PIN // Y2 endstop pin override #define Y2_ENDSTOP_ADJUSTMENT 0 // Y2 offset relative to Y endstop #endif #endif @@ -877,20 +877,20 @@ //#define Z_MULTI_ENDSTOPS // Other Z axes have their own endstops #if ENABLED(Z_MULTI_ENDSTOPS) - #define Z2_USE_ENDSTOP _XMAX_ // Z2 endstop board plug. Don't forget to enable USE_*_PLUG. + //#define Z2_STOP_PIN X_MAX_PIN // Z2 endstop pin override #define Z2_ENDSTOP_ADJUSTMENT 0 // Z2 offset relative to Z endstop #endif #ifdef Z3_DRIVER_TYPE //#define INVERT_Z3_VS_Z_DIR // Z3 direction signal is the opposite of Z #if ENABLED(Z_MULTI_ENDSTOPS) - #define Z3_USE_ENDSTOP _YMAX_ // Z3 endstop board plug. Don't forget to enable USE_*_PLUG. + //#define Z3_STOP_PIN Y_MAX_PIN // Z3 endstop pin override #define Z3_ENDSTOP_ADJUSTMENT 0 // Z3 offset relative to Z endstop #endif #endif #ifdef Z4_DRIVER_TYPE //#define INVERT_Z4_VS_Z_DIR // Z4 direction signal is the opposite of Z #if ENABLED(Z_MULTI_ENDSTOPS) - #define Z4_USE_ENDSTOP _ZMAX_ // Z4 endstop board plug. Don't forget to enable USE_*_PLUG. + //#define Z4_STOP_PIN Z_MAX_PIN // Z4 endstop pin override #define Z4_ENDSTOP_ADJUSTMENT 0 // Z4 offset relative to Z endstop #endif #endif diff --git a/Marlin/src/HAL/AVR/endstop_interrupts.h b/Marlin/src/HAL/AVR/endstop_interrupts.h index 5511aa406f..a67b4493f0 100644 --- a/Marlin/src/HAL/AVR/endstop_interrupts.h +++ b/Marlin/src/HAL/AVR/endstop_interrupts.h @@ -160,7 +160,7 @@ void setup_endstop_interrupts() { pciSetup(Z_MAX_PIN); #endif #endif - #if HAS_Z_MIN + #if HAS_Z_MIN_PIN #if (digitalPinToInterrupt(Z_MIN_PIN) != NOT_AN_INTERRUPT) _ATTACH(Z_MIN_PIN); #else @@ -172,14 +172,14 @@ void setup_endstop_interrupts() { #if (digitalPinToInterrupt(I_MAX_PIN) != NOT_AN_INTERRUPT) _ATTACH(I_MAX_PIN); #else - static_assert(digitalPinHasPCICR(I_MAX_PIN), "I_MAX_PIN is not interrupt-capable"); + static_assert(digitalPinHasPCICR(I_MAX_PIN), "I_MAX_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."); pciSetup(I_MAX_PIN); #endif #elif HAS_I_MIN #if (digitalPinToInterrupt(I_MIN_PIN) != NOT_AN_INTERRUPT) _ATTACH(I_MIN_PIN); #else - static_assert(digitalPinHasPCICR(I_MIN_PIN), "I_MIN_PIN is not interrupt-capable"); + static_assert(digitalPinHasPCICR(I_MIN_PIN), "I_MIN_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."); pciSetup(I_MIN_PIN); #endif #endif @@ -187,14 +187,14 @@ void setup_endstop_interrupts() { #if (digitalPinToInterrupt(J_MAX_PIN) != NOT_AN_INTERRUPT) _ATTACH(J_MAX_PIN); #else - static_assert(digitalPinHasPCICR(J_MAX_PIN), "J_MAX_PIN is not interrupt-capable"); + static_assert(digitalPinHasPCICR(J_MAX_PIN), "J_MAX_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."); pciSetup(J_MAX_PIN); #endif #elif HAS_J_MIN #if (digitalPinToInterrupt(J_MIN_PIN) != NOT_AN_INTERRUPT) _ATTACH(J_MIN_PIN); #else - static_assert(digitalPinHasPCICR(J_MIN_PIN), "J_MIN_PIN is not interrupt-capable"); + static_assert(digitalPinHasPCICR(J_MIN_PIN), "J_MIN_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."); pciSetup(J_MIN_PIN); #endif #endif @@ -202,14 +202,14 @@ void setup_endstop_interrupts() { #if (digitalPinToInterrupt(K_MAX_PIN) != NOT_AN_INTERRUPT) _ATTACH(K_MAX_PIN); #else - static_assert(digitalPinHasPCICR(K_MAX_PIN), "K_MAX_PIN is not interrupt-capable"); + static_assert(digitalPinHasPCICR(K_MAX_PIN), "K_MAX_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."); pciSetup(K_MAX_PIN); #endif #elif HAS_K_MIN #if (digitalPinToInterrupt(K_MIN_PIN) != NOT_AN_INTERRUPT) _ATTACH(K_MIN_PIN); #else - static_assert(digitalPinHasPCICR(K_MIN_PIN), "K_MIN_PIN is not interrupt-capable"); + static_assert(digitalPinHasPCICR(K_MIN_PIN), "K_MIN_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."); pciSetup(K_MIN_PIN); #endif #endif @@ -217,14 +217,14 @@ void setup_endstop_interrupts() { #if (digitalPinToInterrupt(U_MAX_PIN) != NOT_AN_INTERRUPT) _ATTACH(U_MAX_PIN); #else - static_assert(digitalPinHasPCICR(U_MAX_PIN), "U_MAX_PIN is not interrupt-capable"); + static_assert(digitalPinHasPCICR(U_MAX_PIN), "U_MAX_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."); pciSetup(U_MAX_PIN); #endif #elif HAS_U_MIN #if (digitalPinToInterrupt(U_MIN_PIN) != NOT_AN_INTERRUPT) _ATTACH(U_MIN_PIN); #else - static_assert(digitalPinHasPCICR(U_MIN_PIN), "U_MIN_PIN is not interrupt-capable"); + static_assert(digitalPinHasPCICR(U_MIN_PIN), "U_MIN_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."); pciSetup(U_MIN_PIN); #endif #endif @@ -232,14 +232,14 @@ void setup_endstop_interrupts() { #if (digitalPinToInterrupt(V_MAX_PIN) != NOT_AN_INTERRUPT) _ATTACH(V_MAX_PIN); #else - static_assert(digitalPinHasPCICR(V_MAX_PIN), "V_MAX_PIN is not interrupt-capable"); + static_assert(digitalPinHasPCICR(V_MAX_PIN), "V_MAX_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."); pciSetup(V_MAX_PIN); #endif #elif HAS_V_MIN #if (digitalPinToInterrupt(V_MIN_PIN) != NOT_AN_INTERRUPT) _ATTACH(V_MIN_PIN); #else - static_assert(digitalPinHasPCICR(V_MIN_PIN), "V_MIN_PIN is not interrupt-capable"); + static_assert(digitalPinHasPCICR(V_MIN_PIN), "V_MIN_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."); pciSetup(V_MIN_PIN); #endif #endif @@ -247,14 +247,14 @@ void setup_endstop_interrupts() { #if (digitalPinToInterrupt(W_MAX_PIN) != NOT_AN_INTERRUPT) _ATTACH(W_MAX_PIN); #else - static_assert(digitalPinHasPCICR(W_MAX_PIN), "W_MAX_PIN is not interrupt-capable"); + static_assert(digitalPinHasPCICR(W_MAX_PIN), "W_MAX_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."); pciSetup(W_MAX_PIN); #endif #elif HAS_W_MIN #if (digitalPinToInterrupt(W_MIN_PIN) != NOT_AN_INTERRUPT) _ATTACH(W_MIN_PIN); #else - static_assert(digitalPinHasPCICR(W_MIN_PIN), "W_MIN_PIN is not interrupt-capable"); + static_assert(digitalPinHasPCICR(W_MIN_PIN), "W_MIN_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."); pciSetup(W_MIN_PIN); #endif #endif diff --git a/Marlin/src/HAL/DUE/endstop_interrupts.h b/Marlin/src/HAL/DUE/endstop_interrupts.h index c1bbcb121b..9ce4fcdb2f 100644 --- a/Marlin/src/HAL/DUE/endstop_interrupts.h +++ b/Marlin/src/HAL/DUE/endstop_interrupts.h @@ -47,33 +47,33 @@ void endstop_ISR() { endstops.update(); } void setup_endstop_interrupts() { #define _ATTACH(P) attachInterrupt(digitalPinToInterrupt(P), endstop_ISR, CHANGE) - TERN_(HAS_X_MAX, _ATTACH(X_MAX_PIN)); - TERN_(HAS_X_MIN, _ATTACH(X_MIN_PIN)); - TERN_(HAS_Y_MAX, _ATTACH(Y_MAX_PIN)); - TERN_(HAS_Y_MIN, _ATTACH(Y_MIN_PIN)); - TERN_(HAS_Z_MAX, _ATTACH(Z_MAX_PIN)); - TERN_(HAS_Z_MIN, _ATTACH(Z_MIN_PIN)); - TERN_(HAS_X2_MAX, _ATTACH(X2_MAX_PIN)); - TERN_(HAS_X2_MIN, _ATTACH(X2_MIN_PIN)); - TERN_(HAS_Y2_MAX, _ATTACH(Y2_MAX_PIN)); - TERN_(HAS_Y2_MIN, _ATTACH(Y2_MIN_PIN)); - TERN_(HAS_Z2_MAX, _ATTACH(Z2_MAX_PIN)); - TERN_(HAS_Z2_MIN, _ATTACH(Z2_MIN_PIN)); - TERN_(HAS_Z3_MAX, _ATTACH(Z3_MAX_PIN)); - TERN_(HAS_Z3_MIN, _ATTACH(Z3_MIN_PIN)); - TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN)); - TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN)); + TERN_(HAS_X_MAX, _ATTACH(X_MAX_PIN)); + TERN_(HAS_X_MIN, _ATTACH(X_MIN_PIN)); + TERN_(HAS_Y_MAX, _ATTACH(Y_MAX_PIN)); + TERN_(HAS_Y_MIN, _ATTACH(Y_MIN_PIN)); + TERN_(HAS_Z_MAX, _ATTACH(Z_MAX_PIN)); + TERN_(HAS_Z_MIN_PIN, _ATTACH(Z_MIN_PIN)); + TERN_(HAS_X2_MAX, _ATTACH(X2_MAX_PIN)); + TERN_(HAS_X2_MIN, _ATTACH(X2_MIN_PIN)); + TERN_(HAS_Y2_MAX, _ATTACH(Y2_MAX_PIN)); + TERN_(HAS_Y2_MIN, _ATTACH(Y2_MIN_PIN)); + TERN_(HAS_Z2_MAX, _ATTACH(Z2_MAX_PIN)); + TERN_(HAS_Z2_MIN, _ATTACH(Z2_MIN_PIN)); + TERN_(HAS_Z3_MAX, _ATTACH(Z3_MAX_PIN)); + TERN_(HAS_Z3_MIN, _ATTACH(Z3_MIN_PIN)); + TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN)); + TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN)); TERN_(HAS_Z_MIN_PROBE_PIN, _ATTACH(Z_MIN_PROBE_PIN)); - TERN_(HAS_I_MAX, _ATTACH(I_MAX_PIN)); - TERN_(HAS_I_MIN, _ATTACH(I_MIN_PIN)); - TERN_(HAS_J_MAX, _ATTACH(J_MAX_PIN)); - TERN_(HAS_J_MIN, _ATTACH(J_MIN_PIN)); - TERN_(HAS_K_MAX, _ATTACH(K_MAX_PIN)); - TERN_(HAS_K_MIN, _ATTACH(K_MIN_PIN)); - TERN_(HAS_U_MAX, _ATTACH(U_MAX_PIN)); - TERN_(HAS_U_MIN, _ATTACH(U_MIN_PIN)); - TERN_(HAS_V_MAX, _ATTACH(V_MAX_PIN)); - TERN_(HAS_V_MIN, _ATTACH(V_MIN_PIN)); - TERN_(HAS_W_MAX, _ATTACH(W_MAX_PIN)); - TERN_(HAS_W_MIN, _ATTACH(W_MIN_PIN)); + TERN_(HAS_I_MAX, _ATTACH(I_MAX_PIN)); + TERN_(HAS_I_MIN, _ATTACH(I_MIN_PIN)); + TERN_(HAS_J_MAX, _ATTACH(J_MAX_PIN)); + TERN_(HAS_J_MIN, _ATTACH(J_MIN_PIN)); + TERN_(HAS_K_MAX, _ATTACH(K_MAX_PIN)); + TERN_(HAS_K_MIN, _ATTACH(K_MIN_PIN)); + TERN_(HAS_U_MAX, _ATTACH(U_MAX_PIN)); + TERN_(HAS_U_MIN, _ATTACH(U_MIN_PIN)); + TERN_(HAS_V_MAX, _ATTACH(V_MAX_PIN)); + TERN_(HAS_V_MIN, _ATTACH(V_MIN_PIN)); + TERN_(HAS_W_MAX, _ATTACH(W_MAX_PIN)); + TERN_(HAS_W_MIN, _ATTACH(W_MIN_PIN)); } diff --git a/Marlin/src/HAL/ESP32/endstop_interrupts.h b/Marlin/src/HAL/ESP32/endstop_interrupts.h index 0536864610..f48cda4511 100644 --- a/Marlin/src/HAL/ESP32/endstop_interrupts.h +++ b/Marlin/src/HAL/ESP32/endstop_interrupts.h @@ -42,33 +42,33 @@ void ICACHE_RAM_ATTR endstop_ISR() { endstops.update(); } void setup_endstop_interrupts() { #define _ATTACH(P) attachInterrupt(digitalPinToInterrupt(P), endstop_ISR, CHANGE) - TERN_(HAS_X_MAX, _ATTACH(X_MAX_PIN)); - TERN_(HAS_X_MIN, _ATTACH(X_MIN_PIN)); - TERN_(HAS_Y_MAX, _ATTACH(Y_MAX_PIN)); - TERN_(HAS_Y_MIN, _ATTACH(Y_MIN_PIN)); - TERN_(HAS_Z_MAX, _ATTACH(Z_MAX_PIN)); - TERN_(HAS_Z_MIN, _ATTACH(Z_MIN_PIN)); - TERN_(HAS_X2_MAX, _ATTACH(X2_MAX_PIN)); - TERN_(HAS_X2_MIN, _ATTACH(X2_MIN_PIN)); - TERN_(HAS_Y2_MAX, _ATTACH(Y2_MAX_PIN)); - TERN_(HAS_Y2_MIN, _ATTACH(Y2_MIN_PIN)); - TERN_(HAS_Z2_MAX, _ATTACH(Z2_MAX_PIN)); - TERN_(HAS_Z2_MIN, _ATTACH(Z2_MIN_PIN)); - TERN_(HAS_Z3_MAX, _ATTACH(Z3_MAX_PIN)); - TERN_(HAS_Z3_MIN, _ATTACH(Z3_MIN_PIN)); - TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN)); - TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN)); + TERN_(HAS_X_MAX, _ATTACH(X_MAX_PIN)); + TERN_(HAS_X_MIN, _ATTACH(X_MIN_PIN)); + TERN_(HAS_Y_MAX, _ATTACH(Y_MAX_PIN)); + TERN_(HAS_Y_MIN, _ATTACH(Y_MIN_PIN)); + TERN_(HAS_Z_MAX, _ATTACH(Z_MAX_PIN)); + TERN_(HAS_Z_MIN_PIN, _ATTACH(Z_MIN_PIN)); + TERN_(HAS_X2_MAX, _ATTACH(X2_MAX_PIN)); + TERN_(HAS_X2_MIN, _ATTACH(X2_MIN_PIN)); + TERN_(HAS_Y2_MAX, _ATTACH(Y2_MAX_PIN)); + TERN_(HAS_Y2_MIN, _ATTACH(Y2_MIN_PIN)); + TERN_(HAS_Z2_MAX, _ATTACH(Z2_MAX_PIN)); + TERN_(HAS_Z2_MIN, _ATTACH(Z2_MIN_PIN)); + TERN_(HAS_Z3_MAX, _ATTACH(Z3_MAX_PIN)); + TERN_(HAS_Z3_MIN, _ATTACH(Z3_MIN_PIN)); + TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN)); + TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN)); TERN_(HAS_Z_MIN_PROBE_PIN, _ATTACH(Z_MIN_PROBE_PIN)); - TERN_(HAS_I_MAX, _ATTACH(I_MAX_PIN)); - TERN_(HAS_I_MIN, _ATTACH(I_MIN_PIN)); - TERN_(HAS_J_MAX, _ATTACH(J_MAX_PIN)); - TERN_(HAS_J_MIN, _ATTACH(J_MIN_PIN)); - TERN_(HAS_K_MAX, _ATTACH(K_MAX_PIN)); - TERN_(HAS_K_MIN, _ATTACH(K_MIN_PIN)); - TERN_(HAS_U_MAX, _ATTACH(U_MAX_PIN)); - TERN_(HAS_U_MIN, _ATTACH(U_MIN_PIN)); - TERN_(HAS_V_MAX, _ATTACH(V_MAX_PIN)); - TERN_(HAS_V_MIN, _ATTACH(V_MIN_PIN)); - TERN_(HAS_W_MAX, _ATTACH(W_MAX_PIN)); - TERN_(HAS_W_MIN, _ATTACH(W_MIN_PIN)); + TERN_(HAS_I_MAX, _ATTACH(I_MAX_PIN)); + TERN_(HAS_I_MIN, _ATTACH(I_MIN_PIN)); + TERN_(HAS_J_MAX, _ATTACH(J_MAX_PIN)); + TERN_(HAS_J_MIN, _ATTACH(J_MIN_PIN)); + TERN_(HAS_K_MAX, _ATTACH(K_MAX_PIN)); + TERN_(HAS_K_MIN, _ATTACH(K_MIN_PIN)); + TERN_(HAS_U_MAX, _ATTACH(U_MAX_PIN)); + TERN_(HAS_U_MIN, _ATTACH(U_MIN_PIN)); + TERN_(HAS_V_MAX, _ATTACH(V_MAX_PIN)); + TERN_(HAS_V_MIN, _ATTACH(V_MIN_PIN)); + TERN_(HAS_W_MAX, _ATTACH(W_MAX_PIN)); + TERN_(HAS_W_MIN, _ATTACH(W_MIN_PIN)); } diff --git a/Marlin/src/HAL/LPC1768/endstop_interrupts.h b/Marlin/src/HAL/LPC1768/endstop_interrupts.h index e4ac17f608..2253b92627 100644 --- a/Marlin/src/HAL/LPC1768/endstop_interrupts.h +++ b/Marlin/src/HAL/LPC1768/endstop_interrupts.h @@ -74,12 +74,36 @@ void setup_endstop_interrupts() { #endif _ATTACH(Z_MAX_PIN); #endif - #if HAS_Z_MIN + #if HAS_Z_MIN_PIN #if !LPC1768_PIN_INTERRUPT_M(Z_MIN_PIN) #error "Z_MIN_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Z_MIN_PIN); #endif + #if HAS_X2_MAX + #if !LPC1768_PIN_INTERRUPT_M(X2_MAX_PIN) + #error "X2_MAX_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." + #endif + _ATTACH(X2_MAX_PIN); + #endif + #if HAS_X2_MIN + #if !LPC1768_PIN_INTERRUPT_M(X2_MIN_PIN) + #error "X2_MIN_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." + #endif + _ATTACH(X2_MIN_PIN); + #endif + #if HAS_Y2_MAX + #if !LPC1768_PIN_INTERRUPT_M(Y2_MAX_PIN) + #error "Y2_MAX_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." + #endif + _ATTACH(Y2_MAX_PIN); + #endif + #if HAS_Y2_MIN + #if !LPC1768_PIN_INTERRUPT_M(Y2_MIN_PIN) + #error "Y2_MIN_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." + #endif + _ATTACH(Y2_MIN_PIN); + #endif #if HAS_Z2_MAX #if !LPC1768_PIN_INTERRUPT_M(Z2_MAX_PIN) #error "Z2_MAX_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." @@ -124,67 +148,67 @@ void setup_endstop_interrupts() { #endif #if HAS_I_MAX #if !LPC1768_PIN_INTERRUPT_M(I_MAX_PIN) - #error "I_MAX_PIN is not INTERRUPT-capable." + #error "I_MAX_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(I_MAX_PIN); #elif HAS_I_MIN #if !LPC1768_PIN_INTERRUPT_M(I_MIN_PIN) - #error "I_MIN_PIN is not INTERRUPT-capable." + #error "I_MIN_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(I_MIN_PIN); #endif #if HAS_J_MAX #if !LPC1768_PIN_INTERRUPT_M(J_MAX_PIN) - #error "J_MAX_PIN is not INTERRUPT-capable." + #error "J_MAX_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(J_MAX_PIN); #elif HAS_J_MIN #if !LPC1768_PIN_INTERRUPT_M(J_MIN_PIN) - #error "J_MIN_PIN is not INTERRUPT-capable." + #error "J_MIN_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(J_MIN_PIN); #endif #if HAS_K_MAX #if !LPC1768_PIN_INTERRUPT_M(K_MAX_PIN) - #error "K_MAX_PIN is not INTERRUPT-capable." + #error "K_MAX_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(K_MAX_PIN); #elif HAS_K_MIN #if !LPC1768_PIN_INTERRUPT_M(K_MIN_PIN) - #error "K_MIN_PIN is not INTERRUPT-capable." + #error "K_MIN_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(K_MIN_PIN); #endif #if HAS_U_MAX #if !LPC1768_PIN_INTERRUPT_M(U_MAX_PIN) - #error "U_MAX_PIN is not INTERRUPT-capable." + #error "U_MAX_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(U_MAX_PIN); #elif HAS_U_MIN #if !LPC1768_PIN_INTERRUPT_M(U_MIN_PIN) - #error "U_MIN_PIN is not INTERRUPT-capable." + #error "U_MIN_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(U_MIN_PIN); #endif #if HAS_V_MAX #if !LPC1768_PIN_INTERRUPT_M(V_MAX_PIN) - #error "V_MAX_PIN is not INTERRUPT-capable." + #error "V_MAX_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(V_MAX_PIN); #elif HAS_V_MIN #if !LPC1768_PIN_INTERRUPT_M(V_MIN_PIN) - #error "V_MIN_PIN is not INTERRUPT-capable." + #error "V_MIN_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(V_MIN_PIN); #endif #if HAS_W_MAX #if !LPC1768_PIN_INTERRUPT_M(W_MAX_PIN) - #error "W_MAX_PIN is not INTERRUPT-capable." + #error "W_MAX_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(W_MAX_PIN); #elif HAS_W_MIN #if !LPC1768_PIN_INTERRUPT_M(W_MIN_PIN) - #error "W_MIN_PIN is not INTERRUPT-capable." + #error "W_MIN_PIN is not INTERRUPT-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(W_MIN_PIN); #endif diff --git a/Marlin/src/HAL/SAMD21/endstop_interrupts.h b/Marlin/src/HAL/SAMD21/endstop_interrupts.h index d8711aa018..a277e04097 100644 --- a/Marlin/src/HAL/SAMD21/endstop_interrupts.h +++ b/Marlin/src/HAL/SAMD21/endstop_interrupts.h @@ -54,30 +54,34 @@ #include "../../module/endstops.h" #define MATCH_EILINE(P1,P2) (P1 != P2 && PIN_TO_EILINE(P1) == PIN_TO_EILINE(P2)) -#define MATCH_X_MAX_EILINE(P) TERN0(HAS_X_MAX, DEFER4(MATCH_EILINE)(P, X_MAX_PIN)) -#define MATCH_X_MIN_EILINE(P) TERN0(HAS_X_MIN, DEFER4(MATCH_EILINE)(P, X_MIN_PIN)) -#define MATCH_Y_MAX_EILINE(P) TERN0(HAS_Y_MAX, DEFER4(MATCH_EILINE)(P, Y_MAX_PIN)) -#define MATCH_Y_MIN_EILINE(P) TERN0(HAS_Y_MIN, DEFER4(MATCH_EILINE)(P, Y_MIN_PIN)) -#define MATCH_Z_MAX_EILINE(P) TERN0(HAS_Z_MAX, DEFER4(MATCH_EILINE)(P, Z_MAX_PIN)) -#define MATCH_Z_MIN_EILINE(P) TERN0(HAS_Z_MIN, DEFER4(MATCH_EILINE)(P, Z_MIN_PIN)) -#define MATCH_I_MAX_EILINE(P) TERN0(HAS_I_MAX, DEFER4(MATCH_EILINE)(P, I_MAX_PIN)) -#define MATCH_I_MIN_EILINE(P) TERN0(HAS_I_MIN, DEFER4(MATCH_EILINE)(P, I_MIN_PIN)) -#define MATCH_J_MAX_EILINE(P) TERN0(HAS_J_MAX, DEFER4(MATCH_EILINE)(P, J_MAX_PIN)) -#define MATCH_J_MIN_EILINE(P) TERN0(HAS_J_MIN, DEFER4(MATCH_EILINE)(P, J_MIN_PIN)) -#define MATCH_K_MAX_EILINE(P) TERN0(HAS_K_MAX, DEFER4(MATCH_EILINE)(P, K_MAX_PIN)) -#define MATCH_K_MIN_EILINE(P) TERN0(HAS_K_MIN, DEFER4(MATCH_EILINE)(P, K_MIN_PIN)) -#define MATCH_U_MAX_EILINE(P) TERN0(HAS_U_MAX, DEFER4(MATCH_EILINE)(P, U_MAX_PIN)) -#define MATCH_U_MIN_EILINE(P) TERN0(HAS_U_MIN, DEFER4(MATCH_EILINE)(P, U_MIN_PIN)) -#define MATCH_V_MAX_EILINE(P) TERN0(HAS_V_MAX, DEFER4(MATCH_EILINE)(P, V_MAX_PIN)) -#define MATCH_V_MIN_EILINE(P) TERN0(HAS_V_MIN, DEFER4(MATCH_EILINE)(P, V_MIN_PIN)) -#define MATCH_W_MAX_EILINE(P) TERN0(HAS_W_MAX, DEFER4(MATCH_EILINE)(P, W_MAX_PIN)) -#define MATCH_W_MIN_EILINE(P) TERN0(HAS_W_MIN, DEFER4(MATCH_EILINE)(P, W_MIN_PIN)) -#define MATCH_Z2_MAX_EILINE(P) TERN0(HAS_Z2_MAX, DEFER4(MATCH_EILINE)(P, Z2_MAX_PIN)) -#define MATCH_Z2_MIN_EILINE(P) TERN0(HAS_Z2_MIN, DEFER4(MATCH_EILINE)(P, Z2_MIN_PIN)) -#define MATCH_Z3_MAX_EILINE(P) TERN0(HAS_Z3_MAX, DEFER4(MATCH_EILINE)(P, Z3_MAX_PIN)) -#define MATCH_Z3_MIN_EILINE(P) TERN0(HAS_Z3_MIN, DEFER4(MATCH_EILINE)(P, Z3_MIN_PIN)) -#define MATCH_Z4_MAX_EILINE(P) TERN0(HAS_Z4_MAX, DEFER4(MATCH_EILINE)(P, Z4_MAX_PIN)) -#define MATCH_Z4_MIN_EILINE(P) TERN0(HAS_Z4_MIN, DEFER4(MATCH_EILINE)(P, Z4_MIN_PIN)) +#define MATCH_X_MAX_EILINE(P) TERN0(HAS_X_MAX, DEFER4(MATCH_EILINE)(P, X_MAX_PIN)) +#define MATCH_X_MIN_EILINE(P) TERN0(HAS_X_MIN, DEFER4(MATCH_EILINE)(P, X_MIN_PIN)) +#define MATCH_Y_MAX_EILINE(P) TERN0(HAS_Y_MAX, DEFER4(MATCH_EILINE)(P, Y_MAX_PIN)) +#define MATCH_Y_MIN_EILINE(P) TERN0(HAS_Y_MIN, DEFER4(MATCH_EILINE)(P, Y_MIN_PIN)) +#define MATCH_Z_MAX_EILINE(P) TERN0(HAS_Z_MAX, DEFER4(MATCH_EILINE)(P, Z_MAX_PIN)) +#define MATCH_Z_MIN_EILINE(P) TERN0(HAS_Z_MIN_PIN, DEFER4(MATCH_EILINE)(P, Z_MIN_PIN)) +#define MATCH_I_MAX_EILINE(P) TERN0(HAS_I_MAX, DEFER4(MATCH_EILINE)(P, I_MAX_PIN)) +#define MATCH_I_MIN_EILINE(P) TERN0(HAS_I_MIN, DEFER4(MATCH_EILINE)(P, I_MIN_PIN)) +#define MATCH_J_MAX_EILINE(P) TERN0(HAS_J_MAX, DEFER4(MATCH_EILINE)(P, J_MAX_PIN)) +#define MATCH_J_MIN_EILINE(P) TERN0(HAS_J_MIN, DEFER4(MATCH_EILINE)(P, J_MIN_PIN)) +#define MATCH_K_MAX_EILINE(P) TERN0(HAS_K_MAX, DEFER4(MATCH_EILINE)(P, K_MAX_PIN)) +#define MATCH_K_MIN_EILINE(P) TERN0(HAS_K_MIN, DEFER4(MATCH_EILINE)(P, K_MIN_PIN)) +#define MATCH_U_MAX_EILINE(P) TERN0(HAS_U_MAX, DEFER4(MATCH_EILINE)(P, U_MAX_PIN)) +#define MATCH_U_MIN_EILINE(P) TERN0(HAS_U_MIN, DEFER4(MATCH_EILINE)(P, U_MIN_PIN)) +#define MATCH_V_MAX_EILINE(P) TERN0(HAS_V_MAX, DEFER4(MATCH_EILINE)(P, V_MAX_PIN)) +#define MATCH_V_MIN_EILINE(P) TERN0(HAS_V_MIN, DEFER4(MATCH_EILINE)(P, V_MIN_PIN)) +#define MATCH_W_MAX_EILINE(P) TERN0(HAS_W_MAX, DEFER4(MATCH_EILINE)(P, W_MAX_PIN)) +#define MATCH_W_MIN_EILINE(P) TERN0(HAS_W_MIN, DEFER4(MATCH_EILINE)(P, W_MIN_PIN)) +#define MATCH_X2_MAX_EILINE(P) TERN0(HAS_X2_MAX, DEFER4(MATCH_EILINE)(P, X2_MAX_PIN)) +#define MATCH_X2_MIN_EILINE(P) TERN0(HAS_X2_MIN, DEFER4(MATCH_EILINE)(P, X2_MIN_PIN)) +#define MATCH_Y2_MAX_EILINE(P) TERN0(HAS_Y2_MAX, DEFER4(MATCH_EILINE)(P, Y2_MAX_PIN)) +#define MATCH_Y2_MIN_EILINE(P) TERN0(HAS_Y2_MIN, DEFER4(MATCH_EILINE)(P, Y2_MIN_PIN)) +#define MATCH_Z2_MAX_EILINE(P) TERN0(HAS_Z2_MAX, DEFER4(MATCH_EILINE)(P, Z2_MAX_PIN)) +#define MATCH_Z2_MIN_EILINE(P) TERN0(HAS_Z2_MIN, DEFER4(MATCH_EILINE)(P, Z2_MIN_PIN)) +#define MATCH_Z3_MAX_EILINE(P) TERN0(HAS_Z3_MAX, DEFER4(MATCH_EILINE)(P, Z3_MAX_PIN)) +#define MATCH_Z3_MIN_EILINE(P) TERN0(HAS_Z3_MIN, DEFER4(MATCH_EILINE)(P, Z3_MIN_PIN)) +#define MATCH_Z4_MAX_EILINE(P) TERN0(HAS_Z4_MAX, DEFER4(MATCH_EILINE)(P, Z4_MAX_PIN)) +#define MATCH_Z4_MIN_EILINE(P) TERN0(HAS_Z4_MIN, DEFER4(MATCH_EILINE)(P, Z4_MIN_PIN)) #define MATCH_Z_MIN_PROBE_EILINE(P) TERN0(HAS_Z_MIN_PROBE_PIN, DEFER4(MATCH_EILINE)(P, Z_MIN_PROBE_PIN)) #define AVAILABLE_EILINE(P) ( PIN_TO_EILINE(P) != -1 \ @@ -90,6 +94,8 @@ && !MATCH_U_MAX_EILINE(P) && !MATCH_U_MIN_EILINE(P) \ && !MATCH_V_MAX_EILINE(P) && !MATCH_V_MIN_EILINE(P) \ && !MATCH_W_MAX_EILINE(P) && !MATCH_W_MIN_EILINE(P) \ + && !MATCH_X2_MAX_EILINE(P) && !MATCH_X2_MIN_EILINE(P) \ + && !MATCH_Y2_MAX_EILINE(P) && !MATCH_Y2_MIN_EILINE(P) \ && !MATCH_Z2_MAX_EILINE(P) && !MATCH_Z2_MIN_EILINE(P) \ && !MATCH_Z3_MAX_EILINE(P) && !MATCH_Z3_MIN_EILINE(P) \ && !MATCH_Z4_MAX_EILINE(P) && !MATCH_Z4_MIN_EILINE(P) \ @@ -102,151 +108,175 @@ void setup_endstop_interrupts() { #define _ATTACH(P) attachInterrupt(P, endstop_ISR, CHANGE) #if HAS_X_MAX #if !AVAILABLE_EILINE(X_MAX_PIN) - #error "X_MAX_PIN has no EXTINT line available." + #error "X_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(X_MAX_PIN); #endif #if HAS_X_MIN #if !AVAILABLE_EILINE(X_MIN_PIN) - #error "X_MIN_PIN has no EXTINT line available." + #error "X_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(X_MIN_PIN); #endif #if HAS_Y_MAX #if !AVAILABLE_EILINE(Y_MAX_PIN) - #error "Y_MAX_PIN has no EXTINT line available." + #error "Y_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Y_MAX_PIN); #endif #if HAS_Y_MIN #if !AVAILABLE_EILINE(Y_MIN_PIN) - #error "Y_MIN_PIN has no EXTINT line available." + #error "Y_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Y_MIN_PIN); #endif #if HAS_Z_MAX #if !AVAILABLE_EILINE(Z_MAX_PIN) - #error "Z_MAX_PIN has no EXTINT line available." + #error "Z_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Z_MAX_PIN); #endif - #if HAS_Z_MIN + #if HAS_Z_MIN_PIN #if !AVAILABLE_EILINE(Z_MIN_PIN) - #error "Z_MIN_PIN has no EXTINT line available." + #error "Z_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Z_MIN_PIN); #endif + #if HAS_X2_MAX + #if !AVAILABLE_EILINE(X2_MAX_PIN) + #error "X2_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." + #endif + _ATTACH(X2_MAX_PIN); + #endif + #if HAS_X2_MIN + #if !AVAILABLE_EILINE(X2_MIN_PIN) + #error "X2_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." + #endif + _ATTACH(X2_MIN_PIN); + #endif + #if HAS_Y2_MAX + #if !AVAILABLE_EILINE(Y2_MAX_PIN) + #error "Y2_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." + #endif + _ATTACH(Y2_MAX_PIN); + #endif + #if HAS_Y2_MIN + #if !AVAILABLE_EILINE(Y2_MIN_PIN) + #error "Y2_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." + #endif + _ATTACH(Y2_MIN_PIN); + #endif #if HAS_Z2_MAX #if !AVAILABLE_EILINE(Z2_MAX_PIN) - #error "Z2_MAX_PIN has no EXTINT line available." + #error "Z2_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Z2_MAX_PIN); #endif #if HAS_Z2_MIN #if !AVAILABLE_EILINE(Z2_MIN_PIN) - #error "Z2_MIN_PIN has no EXTINT line available." + #error "Z2_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Z2_MIN_PIN); #endif #if HAS_Z3_MAX #if !AVAILABLE_EILINE(Z3_MAX_PIN) - #error "Z3_MAX_PIN has no EXTINT line available." + #error "Z3_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Z3_MAX_PIN); #endif #if HAS_Z3_MIN #if !AVAILABLE_EILINE(Z3_MIN_PIN) - #error "Z3_MIN_PIN has no EXTINT line available." + #error "Z3_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Z3_MIN_PIN); #endif #if HAS_Z4_MAX #if !AVAILABLE_EILINE(Z4_MAX_PIN) - #error "Z4_MAX_PIN has no EXTINT line available." + #error "Z4_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Z4_MAX_PIN); #endif #if HAS_Z4_MIN #if !AVAILABLE_EILINE(Z4_MIN_PIN) - #error "Z4_MIN_PIN has no EXTINT line available." + #error "Z4_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Z4_MIN_PIN); #endif #if HAS_Z_MIN_PROBE_PIN #if !AVAILABLE_EILINE(Z_MIN_PROBE_PIN) - #error "Z_MIN_PROBE_PIN has no EXTINT line available." + #error "Z_MIN_PROBE_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Z_MIN_PROBE_PIN); #endif #if HAS_I_MAX #if !AVAILABLE_EILINE(I_MAX_PIN) - #error "I_MAX_PIN has no EXTINT line available." + #error "I_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(I_MAX_PIN, endstop_ISR, CHANGE); #endif #if HAS_I_MIN #if !AVAILABLE_EILINE(I_MIN_PIN) - #error "I_MIN_PIN has no EXTINT line available." + #error "I_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(I_MIN_PIN, endstop_ISR, CHANGE); #endif #if HAS_J_MAX #if !AVAILABLE_EILINE(J_MAX_PIN) - #error "J_MAX_PIN has no EXTINT line available." + #error "J_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(J_MAX_PIN, endstop_ISR, CHANGE); #endif #if HAS_J_MIN #if !AVAILABLE_EILINE(J_MIN_PIN) - #error "J_MIN_PIN has no EXTINT line available." + #error "J_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(J_MIN_PIN, endstop_ISR, CHANGE); #endif #if HAS_K_MAX #if !AVAILABLE_EILINE(K_MAX_PIN) - #error "K_MAX_PIN has no EXTINT line available." + #error "K_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(K_MAX_PIN, endstop_ISR, CHANGE); #endif #if HAS_K_MIN #if !AVAILABLE_EILINE(K_MIN_PIN) - #error "K_MIN_PIN has no EXTINT line available." + #error "K_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(K_MIN_PIN, endstop_ISR, CHANGE); #endif #if HAS_U_MAX #if !AVAILABLE_EILINE(U_MAX_PIN) - #error "U_MAX_PIN has no EXTINT line available." + #error "U_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(U_MAX_PIN, endstop_ISR, CHANGE); #endif #if HAS_U_MIN #if !AVAILABLE_EILINE(U_MIN_PIN) - #error "U_MIN_PIN has no EXTINT line available." + #error "U_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(U_MIN_PIN, endstop_ISR, CHANGE); #endif #if HAS_V_MAX #if !AVAILABLE_EILINE(V_MAX_PIN) - #error "V_MAX_PIN has no EXTINT line available." + #error "V_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(V_MAX_PIN, endstop_ISR, CHANGE); #endif #if HAS_V_MIN #if !AVAILABLE_EILINE(V_MIN_PIN) - #error "V_MIN_PIN has no EXTINT line available." + #error "V_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(V_MIN_PIN, endstop_ISR, CHANGE); #endif #if HAS_W_MAX #if !AVAILABLE_EILINE(W_MAX_PIN) - #error "W_MAX_PIN has no EXTINT line available." + #error "W_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(W_MAX_PIN, endstop_ISR, CHANGE); #endif #if HAS_W_MIN #if !AVAILABLE_EILINE(W_MIN_PIN) - #error "W_MIN_PIN has no EXTINT line available." + #error "W_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(W_MIN_PIN, endstop_ISR, CHANGE); #endif diff --git a/Marlin/src/HAL/SAMD51/endstop_interrupts.h b/Marlin/src/HAL/SAMD51/endstop_interrupts.h index e0e811c3a0..b5fead26f4 100644 --- a/Marlin/src/HAL/SAMD51/endstop_interrupts.h +++ b/Marlin/src/HAL/SAMD51/endstop_interrupts.h @@ -53,30 +53,34 @@ #include "../../module/endstops.h" #define MATCH_EILINE(P1,P2) (P1 != P2 && PIN_TO_EILINE(P1) == PIN_TO_EILINE(P2)) -#define MATCH_X_MAX_EILINE(P) TERN0(HAS_X_MAX, DEFER4(MATCH_EILINE)(P, X_MAX_PIN)) -#define MATCH_X_MIN_EILINE(P) TERN0(HAS_X_MIN, DEFER4(MATCH_EILINE)(P, X_MIN_PIN)) -#define MATCH_Y_MAX_EILINE(P) TERN0(HAS_Y_MAX, DEFER4(MATCH_EILINE)(P, Y_MAX_PIN)) -#define MATCH_Y_MIN_EILINE(P) TERN0(HAS_Y_MIN, DEFER4(MATCH_EILINE)(P, Y_MIN_PIN)) -#define MATCH_Z_MAX_EILINE(P) TERN0(HAS_Z_MAX, DEFER4(MATCH_EILINE)(P, Z_MAX_PIN)) -#define MATCH_Z_MIN_EILINE(P) TERN0(HAS_Z_MIN, DEFER4(MATCH_EILINE)(P, Z_MIN_PIN)) -#define MATCH_I_MAX_EILINE(P) TERN0(HAS_I_MAX, DEFER4(MATCH_EILINE)(P, I_MAX_PIN)) -#define MATCH_I_MIN_EILINE(P) TERN0(HAS_I_MIN, DEFER4(MATCH_EILINE)(P, I_MIN_PIN)) -#define MATCH_J_MAX_EILINE(P) TERN0(HAS_J_MAX, DEFER4(MATCH_EILINE)(P, J_MAX_PIN)) -#define MATCH_J_MIN_EILINE(P) TERN0(HAS_J_MIN, DEFER4(MATCH_EILINE)(P, J_MIN_PIN)) -#define MATCH_K_MAX_EILINE(P) TERN0(HAS_K_MAX, DEFER4(MATCH_EILINE)(P, K_MAX_PIN)) -#define MATCH_K_MIN_EILINE(P) TERN0(HAS_K_MIN, DEFER4(MATCH_EILINE)(P, K_MIN_PIN)) -#define MATCH_U_MAX_EILINE(P) TERN0(HAS_U_MAX, DEFER4(MATCH_EILINE)(P, U_MAX_PIN)) -#define MATCH_U_MIN_EILINE(P) TERN0(HAS_U_MIN, DEFER4(MATCH_EILINE)(P, U_MIN_PIN)) -#define MATCH_V_MAX_EILINE(P) TERN0(HAS_V_MAX, DEFER4(MATCH_EILINE)(P, V_MAX_PIN)) -#define MATCH_V_MIN_EILINE(P) TERN0(HAS_V_MIN, DEFER4(MATCH_EILINE)(P, V_MIN_PIN)) -#define MATCH_W_MAX_EILINE(P) TERN0(HAS_W_MAX, DEFER4(MATCH_EILINE)(P, W_MAX_PIN)) -#define MATCH_W_MIN_EILINE(P) TERN0(HAS_W_MIN, DEFER4(MATCH_EILINE)(P, W_MIN_PIN)) -#define MATCH_Z2_MAX_EILINE(P) TERN0(HAS_Z2_MAX, DEFER4(MATCH_EILINE)(P, Z2_MAX_PIN)) -#define MATCH_Z2_MIN_EILINE(P) TERN0(HAS_Z2_MIN, DEFER4(MATCH_EILINE)(P, Z2_MIN_PIN)) -#define MATCH_Z3_MAX_EILINE(P) TERN0(HAS_Z3_MAX, DEFER4(MATCH_EILINE)(P, Z3_MAX_PIN)) -#define MATCH_Z3_MIN_EILINE(P) TERN0(HAS_Z3_MIN, DEFER4(MATCH_EILINE)(P, Z3_MIN_PIN)) -#define MATCH_Z4_MAX_EILINE(P) TERN0(HAS_Z4_MAX, DEFER4(MATCH_EILINE)(P, Z4_MAX_PIN)) -#define MATCH_Z4_MIN_EILINE(P) TERN0(HAS_Z4_MIN, DEFER4(MATCH_EILINE)(P, Z4_MIN_PIN)) +#define MATCH_X_MAX_EILINE(P) TERN0(HAS_X_MAX, DEFER4(MATCH_EILINE)(P, X_MAX_PIN)) +#define MATCH_X_MIN_EILINE(P) TERN0(HAS_X_MIN, DEFER4(MATCH_EILINE)(P, X_MIN_PIN)) +#define MATCH_Y_MAX_EILINE(P) TERN0(HAS_Y_MAX, DEFER4(MATCH_EILINE)(P, Y_MAX_PIN)) +#define MATCH_Y_MIN_EILINE(P) TERN0(HAS_Y_MIN, DEFER4(MATCH_EILINE)(P, Y_MIN_PIN)) +#define MATCH_Z_MAX_EILINE(P) TERN0(HAS_Z_MAX, DEFER4(MATCH_EILINE)(P, Z_MAX_PIN)) +#define MATCH_Z_MIN_EILINE(P) TERN0(HAS_Z_MIN_PIN, DEFER4(MATCH_EILINE)(P, Z_MIN_PIN)) +#define MATCH_I_MAX_EILINE(P) TERN0(HAS_I_MAX, DEFER4(MATCH_EILINE)(P, I_MAX_PIN)) +#define MATCH_I_MIN_EILINE(P) TERN0(HAS_I_MIN, DEFER4(MATCH_EILINE)(P, I_MIN_PIN)) +#define MATCH_J_MAX_EILINE(P) TERN0(HAS_J_MAX, DEFER4(MATCH_EILINE)(P, J_MAX_PIN)) +#define MATCH_J_MIN_EILINE(P) TERN0(HAS_J_MIN, DEFER4(MATCH_EILINE)(P, J_MIN_PIN)) +#define MATCH_K_MAX_EILINE(P) TERN0(HAS_K_MAX, DEFER4(MATCH_EILINE)(P, K_MAX_PIN)) +#define MATCH_K_MIN_EILINE(P) TERN0(HAS_K_MIN, DEFER4(MATCH_EILINE)(P, K_MIN_PIN)) +#define MATCH_U_MAX_EILINE(P) TERN0(HAS_U_MAX, DEFER4(MATCH_EILINE)(P, U_MAX_PIN)) +#define MATCH_U_MIN_EILINE(P) TERN0(HAS_U_MIN, DEFER4(MATCH_EILINE)(P, U_MIN_PIN)) +#define MATCH_V_MAX_EILINE(P) TERN0(HAS_V_MAX, DEFER4(MATCH_EILINE)(P, V_MAX_PIN)) +#define MATCH_V_MIN_EILINE(P) TERN0(HAS_V_MIN, DEFER4(MATCH_EILINE)(P, V_MIN_PIN)) +#define MATCH_W_MAX_EILINE(P) TERN0(HAS_W_MAX, DEFER4(MATCH_EILINE)(P, W_MAX_PIN)) +#define MATCH_W_MIN_EILINE(P) TERN0(HAS_W_MIN, DEFER4(MATCH_EILINE)(P, W_MIN_PIN)) +#define MATCH_X2_MAX_EILINE(P) TERN0(HAS_X2_MAX, DEFER4(MATCH_EILINE)(P, X2_MAX_PIN)) +#define MATCH_X2_MIN_EILINE(P) TERN0(HAS_X2_MIN, DEFER4(MATCH_EILINE)(P, X2_MIN_PIN)) +#define MATCH_Y2_MAX_EILINE(P) TERN0(HAS_Y2_MAX, DEFER4(MATCH_EILINE)(P, Y2_MAX_PIN)) +#define MATCH_Y2_MIN_EILINE(P) TERN0(HAS_Y2_MIN, DEFER4(MATCH_EILINE)(P, Y2_MIN_PIN)) +#define MATCH_Z2_MAX_EILINE(P) TERN0(HAS_Z2_MAX, DEFER4(MATCH_EILINE)(P, Z2_MAX_PIN)) +#define MATCH_Z2_MIN_EILINE(P) TERN0(HAS_Z2_MIN, DEFER4(MATCH_EILINE)(P, Z2_MIN_PIN)) +#define MATCH_Z3_MAX_EILINE(P) TERN0(HAS_Z3_MAX, DEFER4(MATCH_EILINE)(P, Z3_MAX_PIN)) +#define MATCH_Z3_MIN_EILINE(P) TERN0(HAS_Z3_MIN, DEFER4(MATCH_EILINE)(P, Z3_MIN_PIN)) +#define MATCH_Z4_MAX_EILINE(P) TERN0(HAS_Z4_MAX, DEFER4(MATCH_EILINE)(P, Z4_MAX_PIN)) +#define MATCH_Z4_MIN_EILINE(P) TERN0(HAS_Z4_MIN, DEFER4(MATCH_EILINE)(P, Z4_MIN_PIN)) #define MATCH_Z_MIN_PROBE_EILINE(P) TERN0(HAS_Z_MIN_PROBE_PIN, DEFER4(MATCH_EILINE)(P, Z_MIN_PROBE_PIN)) #define AVAILABLE_EILINE(P) ( PIN_TO_EILINE(P) != -1 \ @@ -89,6 +93,8 @@ && !MATCH_U_MAX_EILINE(P) && !MATCH_U_MIN_EILINE(P) \ && !MATCH_V_MAX_EILINE(P) && !MATCH_V_MIN_EILINE(P) \ && !MATCH_W_MAX_EILINE(P) && !MATCH_W_MIN_EILINE(P) \ + && !MATCH_X2_MAX_EILINE(P) && !MATCH_X2_MIN_EILINE(P) \ + && !MATCH_Y2_MAX_EILINE(P) && !MATCH_Y2_MIN_EILINE(P) \ && !MATCH_Z2_MAX_EILINE(P) && !MATCH_Z2_MIN_EILINE(P) \ && !MATCH_Z3_MAX_EILINE(P) && !MATCH_Z3_MIN_EILINE(P) \ && !MATCH_Z4_MAX_EILINE(P) && !MATCH_Z4_MIN_EILINE(P) \ @@ -101,151 +107,151 @@ void setup_endstop_interrupts() { #define _ATTACH(P) attachInterrupt(P, endstop_ISR, CHANGE) #if HAS_X_MAX #if !AVAILABLE_EILINE(X_MAX_PIN) - #error "X_MAX_PIN has no EXTINT line available." + #error "X_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(X_MAX_PIN); #endif #if HAS_X_MIN #if !AVAILABLE_EILINE(X_MIN_PIN) - #error "X_MIN_PIN has no EXTINT line available." + #error "X_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(X_MIN_PIN); #endif #if HAS_Y_MAX #if !AVAILABLE_EILINE(Y_MAX_PIN) - #error "Y_MAX_PIN has no EXTINT line available." + #error "Y_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Y_MAX_PIN); #endif #if HAS_Y_MIN #if !AVAILABLE_EILINE(Y_MIN_PIN) - #error "Y_MIN_PIN has no EXTINT line available." + #error "Y_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Y_MIN_PIN); #endif #if HAS_Z_MAX #if !AVAILABLE_EILINE(Z_MAX_PIN) - #error "Z_MAX_PIN has no EXTINT line available." + #error "Z_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Z_MAX_PIN); #endif - #if HAS_Z_MIN + #if HAS_Z_MIN_PIN #if !AVAILABLE_EILINE(Z_MIN_PIN) - #error "Z_MIN_PIN has no EXTINT line available." + #error "Z_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Z_MIN_PIN); #endif #if HAS_Z2_MAX #if !AVAILABLE_EILINE(Z2_MAX_PIN) - #error "Z2_MAX_PIN has no EXTINT line available." + #error "Z2_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Z2_MAX_PIN); #endif #if HAS_Z2_MIN #if !AVAILABLE_EILINE(Z2_MIN_PIN) - #error "Z2_MIN_PIN has no EXTINT line available." + #error "Z2_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Z2_MIN_PIN); #endif #if HAS_Z3_MAX #if !AVAILABLE_EILINE(Z3_MAX_PIN) - #error "Z3_MAX_PIN has no EXTINT line available." + #error "Z3_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Z3_MAX_PIN); #endif #if HAS_Z3_MIN #if !AVAILABLE_EILINE(Z3_MIN_PIN) - #error "Z3_MIN_PIN has no EXTINT line available." + #error "Z3_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Z3_MIN_PIN); #endif #if HAS_Z4_MAX #if !AVAILABLE_EILINE(Z4_MAX_PIN) - #error "Z4_MAX_PIN has no EXTINT line available." + #error "Z4_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Z4_MAX_PIN); #endif #if HAS_Z4_MIN #if !AVAILABLE_EILINE(Z4_MIN_PIN) - #error "Z4_MIN_PIN has no EXTINT line available." + #error "Z4_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Z4_MIN_PIN); #endif #if HAS_Z_MIN_PROBE_PIN #if !AVAILABLE_EILINE(Z_MIN_PROBE_PIN) - #error "Z_MIN_PROBE_PIN has no EXTINT line available." + #error "Z_MIN_PROBE_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif _ATTACH(Z_MIN_PROBE_PIN); #endif #if HAS_I_MAX #if !AVAILABLE_EILINE(I_MAX_PIN) - #error "I_MAX_PIN has no EXTINT line available." + #error "I_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(I_MAX_PIN, endstop_ISR, CHANGE); #endif #if HAS_I_MIN #if !AVAILABLE_EILINE(I_MIN_PIN) - #error "I_MIN_PIN has no EXTINT line available." + #error "I_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(I_MIN_PIN, endstop_ISR, CHANGE); #endif #if HAS_J_MAX #if !AVAILABLE_EILINE(J_MAX_PIN) - #error "J_MAX_PIN has no EXTINT line available." + #error "J_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(J_MAX_PIN, endstop_ISR, CHANGE); #endif #if HAS_J_MIN #if !AVAILABLE_EILINE(J_MIN_PIN) - #error "J_MIN_PIN has no EXTINT line available." + #error "J_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(J_MIN_PIN, endstop_ISR, CHANGE); #endif #if HAS_K_MAX #if !AVAILABLE_EILINE(K_MAX_PIN) - #error "K_MAX_PIN has no EXTINT line available." + #error "K_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(K_MAX_PIN, endstop_ISR, CHANGE); #endif #if HAS_K_MIN #if !AVAILABLE_EILINE(K_MIN_PIN) - #error "K_MIN_PIN has no EXTINT line available." + #error "K_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(K_MIN_PIN, endstop_ISR, CHANGE); #endif #if HAS_U_MAX #if !AVAILABLE_EILINE(U_MAX_PIN) - #error "U_MAX_PIN has no EXTINT line available." + #error "U_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(U_MAX_PIN, endstop_ISR, CHANGE); #endif #if HAS_U_MIN #if !AVAILABLE_EILINE(U_MIN_PIN) - #error "U_MIN_PIN has no EXTINT line available." + #error "U_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(U_MIN_PIN, endstop_ISR, CHANGE); #endif #if HAS_V_MAX #if !AVAILABLE_EILINE(V_MAX_PIN) - #error "V_MAX_PIN has no EXTINT line available." + #error "V_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(V_MAX_PIN, endstop_ISR, CHANGE); #endif #if HAS_V_MIN #if !AVAILABLE_EILINE(V_MIN_PIN) - #error "V_MIN_PIN has no EXTINT line available." + #error "V_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(V_MIN_PIN, endstop_ISR, CHANGE); #endif #if HAS_W_MAX #if !AVAILABLE_EILINE(W_MAX_PIN) - #error "W_MAX_PIN has no EXTINT line available." + #error "W_MAX_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(W_MAX_PIN, endstop_ISR, CHANGE); #endif #if HAS_W_MIN #if !AVAILABLE_EILINE(W_MIN_PIN) - #error "W_MIN_PIN has no EXTINT line available." + #error "W_MIN_PIN has no EXTINT line available. Disable ENDSTOP_INTERRUPTS_FEATURE to continue." #endif attachInterrupt(W_MIN_PIN, endstop_ISR, CHANGE); #endif diff --git a/Marlin/src/HAL/STM32/endstop_interrupts.h b/Marlin/src/HAL/STM32/endstop_interrupts.h index d2f20ba1c7..ce160d9405 100644 --- a/Marlin/src/HAL/STM32/endstop_interrupts.h +++ b/Marlin/src/HAL/STM32/endstop_interrupts.h @@ -29,33 +29,33 @@ void endstop_ISR() { endstops.update(); } void setup_endstop_interrupts() { #define _ATTACH(P) attachInterrupt(P, endstop_ISR, CHANGE) - TERN_(HAS_X_MAX, _ATTACH(X_MAX_PIN)); - TERN_(HAS_X_MIN, _ATTACH(X_MIN_PIN)); - TERN_(HAS_Y_MAX, _ATTACH(Y_MAX_PIN)); - TERN_(HAS_Y_MIN, _ATTACH(Y_MIN_PIN)); - TERN_(HAS_Z_MAX, _ATTACH(Z_MAX_PIN)); - TERN_(HAS_Z_MIN, _ATTACH(Z_MIN_PIN)); - TERN_(HAS_X2_MAX, _ATTACH(X2_MAX_PIN)); - TERN_(HAS_X2_MIN, _ATTACH(X2_MIN_PIN)); - TERN_(HAS_Y2_MAX, _ATTACH(Y2_MAX_PIN)); - TERN_(HAS_Y2_MIN, _ATTACH(Y2_MIN_PIN)); - TERN_(HAS_Z2_MAX, _ATTACH(Z2_MAX_PIN)); - TERN_(HAS_Z2_MIN, _ATTACH(Z2_MIN_PIN)); - TERN_(HAS_Z3_MAX, _ATTACH(Z3_MAX_PIN)); - TERN_(HAS_Z3_MIN, _ATTACH(Z3_MIN_PIN)); - TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN)); - TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN)); + TERN_(HAS_X_MAX, _ATTACH(X_MAX_PIN)); + TERN_(HAS_X_MIN, _ATTACH(X_MIN_PIN)); + TERN_(HAS_Y_MAX, _ATTACH(Y_MAX_PIN)); + TERN_(HAS_Y_MIN, _ATTACH(Y_MIN_PIN)); + TERN_(HAS_Z_MAX, _ATTACH(Z_MAX_PIN)); + TERN_(HAS_Z_MIN_PIN, _ATTACH(Z_MIN_PIN)); + TERN_(HAS_X2_MAX, _ATTACH(X2_MAX_PIN)); + TERN_(HAS_X2_MIN, _ATTACH(X2_MIN_PIN)); + TERN_(HAS_Y2_MAX, _ATTACH(Y2_MAX_PIN)); + TERN_(HAS_Y2_MIN, _ATTACH(Y2_MIN_PIN)); + TERN_(HAS_Z2_MAX, _ATTACH(Z2_MAX_PIN)); + TERN_(HAS_Z2_MIN, _ATTACH(Z2_MIN_PIN)); + TERN_(HAS_Z3_MAX, _ATTACH(Z3_MAX_PIN)); + TERN_(HAS_Z3_MIN, _ATTACH(Z3_MIN_PIN)); + TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN)); + TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN)); TERN_(HAS_Z_MIN_PROBE_PIN, _ATTACH(Z_MIN_PROBE_PIN)); - TERN_(HAS_I_MAX, _ATTACH(I_MAX_PIN)); - TERN_(HAS_I_MIN, _ATTACH(I_MIN_PIN)); - TERN_(HAS_J_MAX, _ATTACH(J_MAX_PIN)); - TERN_(HAS_J_MIN, _ATTACH(J_MIN_PIN)); - TERN_(HAS_K_MAX, _ATTACH(K_MAX_PIN)); - TERN_(HAS_K_MIN, _ATTACH(K_MIN_PIN)); - TERN_(HAS_U_MAX, _ATTACH(U_MAX_PIN)); - TERN_(HAS_U_MIN, _ATTACH(U_MIN_PIN)); - TERN_(HAS_V_MAX, _ATTACH(V_MAX_PIN)); - TERN_(HAS_V_MIN, _ATTACH(V_MIN_PIN)); - TERN_(HAS_W_MAX, _ATTACH(W_MAX_PIN)); - TERN_(HAS_W_MIN, _ATTACH(W_MIN_PIN)); + TERN_(HAS_I_MAX, _ATTACH(I_MAX_PIN)); + TERN_(HAS_I_MIN, _ATTACH(I_MIN_PIN)); + TERN_(HAS_J_MAX, _ATTACH(J_MAX_PIN)); + TERN_(HAS_J_MIN, _ATTACH(J_MIN_PIN)); + TERN_(HAS_K_MAX, _ATTACH(K_MAX_PIN)); + TERN_(HAS_K_MIN, _ATTACH(K_MIN_PIN)); + TERN_(HAS_U_MAX, _ATTACH(U_MAX_PIN)); + TERN_(HAS_U_MIN, _ATTACH(U_MIN_PIN)); + TERN_(HAS_V_MAX, _ATTACH(V_MAX_PIN)); + TERN_(HAS_V_MIN, _ATTACH(V_MIN_PIN)); + TERN_(HAS_W_MAX, _ATTACH(W_MAX_PIN)); + TERN_(HAS_W_MIN, _ATTACH(W_MIN_PIN)); } diff --git a/Marlin/src/HAL/STM32F1/endstop_interrupts.h b/Marlin/src/HAL/STM32F1/endstop_interrupts.h index a1ef8a8c3a..b4df5d71f1 100644 --- a/Marlin/src/HAL/STM32F1/endstop_interrupts.h +++ b/Marlin/src/HAL/STM32F1/endstop_interrupts.h @@ -54,33 +54,33 @@ void endstop_ISR() { endstops.update(); } void setup_endstop_interrupts() { #define _ATTACH(P) attachInterrupt(P, endstop_ISR, CHANGE) - TERN_(HAS_X_MAX, _ATTACH(X_MAX_PIN)); - TERN_(HAS_X_MIN, _ATTACH(X_MIN_PIN)); - TERN_(HAS_Y_MAX, _ATTACH(Y_MAX_PIN)); - TERN_(HAS_Y_MIN, _ATTACH(Y_MIN_PIN)); - TERN_(HAS_Z_MAX, _ATTACH(Z_MAX_PIN)); - TERN_(HAS_Z_MIN, _ATTACH(Z_MIN_PIN)); - TERN_(HAS_X2_MAX, _ATTACH(X2_MAX_PIN)); - TERN_(HAS_X2_MIN, _ATTACH(X2_MIN_PIN)); - TERN_(HAS_Y2_MAX, _ATTACH(Y2_MAX_PIN)); - TERN_(HAS_Y2_MIN, _ATTACH(Y2_MIN_PIN)); - TERN_(HAS_Z2_MAX, _ATTACH(Z2_MAX_PIN)); - TERN_(HAS_Z2_MIN, _ATTACH(Z2_MIN_PIN)); - TERN_(HAS_Z3_MAX, _ATTACH(Z3_MAX_PIN)); - TERN_(HAS_Z3_MIN, _ATTACH(Z3_MIN_PIN)); - TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN)); - TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN)); + TERN_(HAS_X_MAX, _ATTACH(X_MAX_PIN)); + TERN_(HAS_X_MIN, _ATTACH(X_MIN_PIN)); + TERN_(HAS_Y_MAX, _ATTACH(Y_MAX_PIN)); + TERN_(HAS_Y_MIN, _ATTACH(Y_MIN_PIN)); + TERN_(HAS_Z_MAX, _ATTACH(Z_MAX_PIN)); + TERN_(HAS_Z_MIN_PIN, _ATTACH(Z_MIN_PIN)); + TERN_(HAS_X2_MAX, _ATTACH(X2_MAX_PIN)); + TERN_(HAS_X2_MIN, _ATTACH(X2_MIN_PIN)); + TERN_(HAS_Y2_MAX, _ATTACH(Y2_MAX_PIN)); + TERN_(HAS_Y2_MIN, _ATTACH(Y2_MIN_PIN)); + TERN_(HAS_Z2_MAX, _ATTACH(Z2_MAX_PIN)); + TERN_(HAS_Z2_MIN, _ATTACH(Z2_MIN_PIN)); + TERN_(HAS_Z3_MAX, _ATTACH(Z3_MAX_PIN)); + TERN_(HAS_Z3_MIN, _ATTACH(Z3_MIN_PIN)); + TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN)); + TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN)); TERN_(HAS_Z_MIN_PROBE_PIN, _ATTACH(Z_MIN_PROBE_PIN)); - TERN_(HAS_I_MAX, _ATTACH(I_MAX_PIN)); - TERN_(HAS_I_MIN, _ATTACH(I_MIN_PIN)); - TERN_(HAS_J_MAX, _ATTACH(J_MAX_PIN)); - TERN_(HAS_J_MIN, _ATTACH(J_MIN_PIN)); - TERN_(HAS_K_MAX, _ATTACH(K_MAX_PIN)); - TERN_(HAS_K_MIN, _ATTACH(K_MIN_PIN)); - TERN_(HAS_U_MAX, _ATTACH(U_MAX_PIN)); - TERN_(HAS_U_MIN, _ATTACH(U_MIN_PIN)); - TERN_(HAS_V_MAX, _ATTACH(V_MAX_PIN)); - TERN_(HAS_V_MIN, _ATTACH(V_MIN_PIN)); - TERN_(HAS_W_MAX, _ATTACH(W_MAX_PIN)); - TERN_(HAS_W_MIN, _ATTACH(W_MIN_PIN)); + TERN_(HAS_I_MAX, _ATTACH(I_MAX_PIN)); + TERN_(HAS_I_MIN, _ATTACH(I_MIN_PIN)); + TERN_(HAS_J_MAX, _ATTACH(J_MAX_PIN)); + TERN_(HAS_J_MIN, _ATTACH(J_MIN_PIN)); + TERN_(HAS_K_MAX, _ATTACH(K_MAX_PIN)); + TERN_(HAS_K_MIN, _ATTACH(K_MIN_PIN)); + TERN_(HAS_U_MAX, _ATTACH(U_MAX_PIN)); + TERN_(HAS_U_MIN, _ATTACH(U_MIN_PIN)); + TERN_(HAS_V_MAX, _ATTACH(V_MAX_PIN)); + TERN_(HAS_V_MIN, _ATTACH(V_MIN_PIN)); + TERN_(HAS_W_MAX, _ATTACH(W_MAX_PIN)); + TERN_(HAS_W_MIN, _ATTACH(W_MIN_PIN)); } diff --git a/Marlin/src/HAL/TEENSY31_32/endstop_interrupts.h b/Marlin/src/HAL/TEENSY31_32/endstop_interrupts.h index c1bbcb121b..9ce4fcdb2f 100644 --- a/Marlin/src/HAL/TEENSY31_32/endstop_interrupts.h +++ b/Marlin/src/HAL/TEENSY31_32/endstop_interrupts.h @@ -47,33 +47,33 @@ void endstop_ISR() { endstops.update(); } void setup_endstop_interrupts() { #define _ATTACH(P) attachInterrupt(digitalPinToInterrupt(P), endstop_ISR, CHANGE) - TERN_(HAS_X_MAX, _ATTACH(X_MAX_PIN)); - TERN_(HAS_X_MIN, _ATTACH(X_MIN_PIN)); - TERN_(HAS_Y_MAX, _ATTACH(Y_MAX_PIN)); - TERN_(HAS_Y_MIN, _ATTACH(Y_MIN_PIN)); - TERN_(HAS_Z_MAX, _ATTACH(Z_MAX_PIN)); - TERN_(HAS_Z_MIN, _ATTACH(Z_MIN_PIN)); - TERN_(HAS_X2_MAX, _ATTACH(X2_MAX_PIN)); - TERN_(HAS_X2_MIN, _ATTACH(X2_MIN_PIN)); - TERN_(HAS_Y2_MAX, _ATTACH(Y2_MAX_PIN)); - TERN_(HAS_Y2_MIN, _ATTACH(Y2_MIN_PIN)); - TERN_(HAS_Z2_MAX, _ATTACH(Z2_MAX_PIN)); - TERN_(HAS_Z2_MIN, _ATTACH(Z2_MIN_PIN)); - TERN_(HAS_Z3_MAX, _ATTACH(Z3_MAX_PIN)); - TERN_(HAS_Z3_MIN, _ATTACH(Z3_MIN_PIN)); - TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN)); - TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN)); + TERN_(HAS_X_MAX, _ATTACH(X_MAX_PIN)); + TERN_(HAS_X_MIN, _ATTACH(X_MIN_PIN)); + TERN_(HAS_Y_MAX, _ATTACH(Y_MAX_PIN)); + TERN_(HAS_Y_MIN, _ATTACH(Y_MIN_PIN)); + TERN_(HAS_Z_MAX, _ATTACH(Z_MAX_PIN)); + TERN_(HAS_Z_MIN_PIN, _ATTACH(Z_MIN_PIN)); + TERN_(HAS_X2_MAX, _ATTACH(X2_MAX_PIN)); + TERN_(HAS_X2_MIN, _ATTACH(X2_MIN_PIN)); + TERN_(HAS_Y2_MAX, _ATTACH(Y2_MAX_PIN)); + TERN_(HAS_Y2_MIN, _ATTACH(Y2_MIN_PIN)); + TERN_(HAS_Z2_MAX, _ATTACH(Z2_MAX_PIN)); + TERN_(HAS_Z2_MIN, _ATTACH(Z2_MIN_PIN)); + TERN_(HAS_Z3_MAX, _ATTACH(Z3_MAX_PIN)); + TERN_(HAS_Z3_MIN, _ATTACH(Z3_MIN_PIN)); + TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN)); + TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN)); TERN_(HAS_Z_MIN_PROBE_PIN, _ATTACH(Z_MIN_PROBE_PIN)); - TERN_(HAS_I_MAX, _ATTACH(I_MAX_PIN)); - TERN_(HAS_I_MIN, _ATTACH(I_MIN_PIN)); - TERN_(HAS_J_MAX, _ATTACH(J_MAX_PIN)); - TERN_(HAS_J_MIN, _ATTACH(J_MIN_PIN)); - TERN_(HAS_K_MAX, _ATTACH(K_MAX_PIN)); - TERN_(HAS_K_MIN, _ATTACH(K_MIN_PIN)); - TERN_(HAS_U_MAX, _ATTACH(U_MAX_PIN)); - TERN_(HAS_U_MIN, _ATTACH(U_MIN_PIN)); - TERN_(HAS_V_MAX, _ATTACH(V_MAX_PIN)); - TERN_(HAS_V_MIN, _ATTACH(V_MIN_PIN)); - TERN_(HAS_W_MAX, _ATTACH(W_MAX_PIN)); - TERN_(HAS_W_MIN, _ATTACH(W_MIN_PIN)); + TERN_(HAS_I_MAX, _ATTACH(I_MAX_PIN)); + TERN_(HAS_I_MIN, _ATTACH(I_MIN_PIN)); + TERN_(HAS_J_MAX, _ATTACH(J_MAX_PIN)); + TERN_(HAS_J_MIN, _ATTACH(J_MIN_PIN)); + TERN_(HAS_K_MAX, _ATTACH(K_MAX_PIN)); + TERN_(HAS_K_MIN, _ATTACH(K_MIN_PIN)); + TERN_(HAS_U_MAX, _ATTACH(U_MAX_PIN)); + TERN_(HAS_U_MIN, _ATTACH(U_MIN_PIN)); + TERN_(HAS_V_MAX, _ATTACH(V_MAX_PIN)); + TERN_(HAS_V_MIN, _ATTACH(V_MIN_PIN)); + TERN_(HAS_W_MAX, _ATTACH(W_MAX_PIN)); + TERN_(HAS_W_MIN, _ATTACH(W_MIN_PIN)); } diff --git a/Marlin/src/HAL/TEENSY35_36/endstop_interrupts.h b/Marlin/src/HAL/TEENSY35_36/endstop_interrupts.h index 48d3bbbfa1..c9ef278769 100644 --- a/Marlin/src/HAL/TEENSY35_36/endstop_interrupts.h +++ b/Marlin/src/HAL/TEENSY35_36/endstop_interrupts.h @@ -46,33 +46,33 @@ void endstop_ISR() { endstops.update(); } */ void setup_endstop_interrupts() { #define _ATTACH(P) attachInterrupt(digitalPinToInterrupt(P), endstop_ISR, CHANGE) - TERN_(HAS_X_MAX, _ATTACH(X_MAX_PIN)); - TERN_(HAS_X_MIN, _ATTACH(X_MIN_PIN)); - TERN_(HAS_Y_MAX, _ATTACH(Y_MAX_PIN)); - TERN_(HAS_Y_MIN, _ATTACH(Y_MIN_PIN)); - TERN_(HAS_Z_MAX, _ATTACH(Z_MAX_PIN)); - TERN_(HAS_Z_MIN, _ATTACH(Z_MIN_PIN)); - TERN_(HAS_X2_MAX, _ATTACH(X2_MAX_PIN)); - TERN_(HAS_X2_MIN, _ATTACH(X2_MIN_PIN)); - TERN_(HAS_Y2_MAX, _ATTACH(Y2_MAX_PIN)); - TERN_(HAS_Y2_MIN, _ATTACH(Y2_MIN_PIN)); - TERN_(HAS_Z2_MAX, _ATTACH(Z2_MAX_PIN)); - TERN_(HAS_Z2_MIN, _ATTACH(Z2_MIN_PIN)); - TERN_(HAS_Z3_MAX, _ATTACH(Z3_MAX_PIN)); - TERN_(HAS_Z3_MIN, _ATTACH(Z3_MIN_PIN)); - TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN)); - TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN)); + TERN_(HAS_X_MAX, _ATTACH(X_MAX_PIN)); + TERN_(HAS_X_MIN, _ATTACH(X_MIN_PIN)); + TERN_(HAS_Y_MAX, _ATTACH(Y_MAX_PIN)); + TERN_(HAS_Y_MIN, _ATTACH(Y_MIN_PIN)); + TERN_(HAS_Z_MAX, _ATTACH(Z_MAX_PIN)); + TERN_(HAS_Z_MIN_PIN, _ATTACH(Z_MIN_PIN)); + TERN_(HAS_X2_MAX, _ATTACH(X2_MAX_PIN)); + TERN_(HAS_X2_MIN, _ATTACH(X2_MIN_PIN)); + TERN_(HAS_Y2_MAX, _ATTACH(Y2_MAX_PIN)); + TERN_(HAS_Y2_MIN, _ATTACH(Y2_MIN_PIN)); + TERN_(HAS_Z2_MAX, _ATTACH(Z2_MAX_PIN)); + TERN_(HAS_Z2_MIN, _ATTACH(Z2_MIN_PIN)); + TERN_(HAS_Z3_MAX, _ATTACH(Z3_MAX_PIN)); + TERN_(HAS_Z3_MIN, _ATTACH(Z3_MIN_PIN)); + TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN)); + TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN)); TERN_(HAS_Z_MIN_PROBE_PIN, _ATTACH(Z_MIN_PROBE_PIN)); - TERN_(HAS_I_MAX, _ATTACH(I_MAX_PIN)); - TERN_(HAS_I_MIN, _ATTACH(I_MIN_PIN)); - TERN_(HAS_J_MAX, _ATTACH(J_MAX_PIN)); - TERN_(HAS_J_MIN, _ATTACH(J_MIN_PIN)); - TERN_(HAS_K_MAX, _ATTACH(K_MAX_PIN)); - TERN_(HAS_K_MIN, _ATTACH(K_MIN_PIN)); - TERN_(HAS_U_MAX, _ATTACH(U_MAX_PIN)); - TERN_(HAS_U_MIN, _ATTACH(U_MIN_PIN)); - TERN_(HAS_V_MAX, _ATTACH(V_MAX_PIN)); - TERN_(HAS_V_MIN, _ATTACH(V_MIN_PIN)); - TERN_(HAS_W_MAX, _ATTACH(W_MAX_PIN)); - TERN_(HAS_W_MIN, _ATTACH(W_MIN_PIN)); + TERN_(HAS_I_MAX, _ATTACH(I_MAX_PIN)); + TERN_(HAS_I_MIN, _ATTACH(I_MIN_PIN)); + TERN_(HAS_J_MAX, _ATTACH(J_MAX_PIN)); + TERN_(HAS_J_MIN, _ATTACH(J_MIN_PIN)); + TERN_(HAS_K_MAX, _ATTACH(K_MAX_PIN)); + TERN_(HAS_K_MIN, _ATTACH(K_MIN_PIN)); + TERN_(HAS_U_MAX, _ATTACH(U_MAX_PIN)); + TERN_(HAS_U_MIN, _ATTACH(U_MIN_PIN)); + TERN_(HAS_V_MAX, _ATTACH(V_MAX_PIN)); + TERN_(HAS_V_MIN, _ATTACH(V_MIN_PIN)); + TERN_(HAS_W_MAX, _ATTACH(W_MAX_PIN)); + TERN_(HAS_W_MIN, _ATTACH(W_MIN_PIN)); } diff --git a/Marlin/src/HAL/TEENSY40_41/endstop_interrupts.h b/Marlin/src/HAL/TEENSY40_41/endstop_interrupts.h index 4c3ddec9f1..1e4ce4cef3 100644 --- a/Marlin/src/HAL/TEENSY40_41/endstop_interrupts.h +++ b/Marlin/src/HAL/TEENSY40_41/endstop_interrupts.h @@ -46,27 +46,33 @@ void endstop_ISR() { endstops.update(); } */ void setup_endstop_interrupts() { #define _ATTACH(P) attachInterrupt(digitalPinToInterrupt(P), endstop_ISR, CHANGE) - TERN_(HAS_X_MAX, _ATTACH(X_MAX_PIN)); - TERN_(HAS_X_MIN, _ATTACH(X_MIN_PIN)); - TERN_(HAS_Y_MAX, _ATTACH(Y_MAX_PIN)); - TERN_(HAS_Y_MIN, _ATTACH(Y_MIN_PIN)); - TERN_(HAS_Z_MAX, _ATTACH(Z_MAX_PIN)); - TERN_(HAS_Z_MIN, _ATTACH(Z_MIN_PIN)); - TERN_(HAS_X2_MAX, _ATTACH(X2_MAX_PIN)); - TERN_(HAS_X2_MIN, _ATTACH(X2_MIN_PIN)); - TERN_(HAS_Y2_MAX, _ATTACH(Y2_MAX_PIN)); - TERN_(HAS_Y2_MIN, _ATTACH(Y2_MIN_PIN)); - TERN_(HAS_Z2_MAX, _ATTACH(Z2_MAX_PIN)); - TERN_(HAS_Z2_MIN, _ATTACH(Z2_MIN_PIN)); - TERN_(HAS_Z3_MAX, _ATTACH(Z3_MAX_PIN)); - TERN_(HAS_Z3_MIN, _ATTACH(Z3_MIN_PIN)); - TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN)); - TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN)); + TERN_(HAS_X_MAX, _ATTACH(X_MAX_PIN)); + TERN_(HAS_X_MIN, _ATTACH(X_MIN_PIN)); + TERN_(HAS_Y_MAX, _ATTACH(Y_MAX_PIN)); + TERN_(HAS_Y_MIN, _ATTACH(Y_MIN_PIN)); + TERN_(HAS_Z_MAX, _ATTACH(Z_MAX_PIN)); + TERN_(HAS_Z_MIN_PIN, _ATTACH(Z_MIN_PIN)); + TERN_(HAS_X2_MAX, _ATTACH(X2_MAX_PIN)); + TERN_(HAS_X2_MIN, _ATTACH(X2_MIN_PIN)); + TERN_(HAS_Y2_MAX, _ATTACH(Y2_MAX_PIN)); + TERN_(HAS_Y2_MIN, _ATTACH(Y2_MIN_PIN)); + TERN_(HAS_Z2_MAX, _ATTACH(Z2_MAX_PIN)); + TERN_(HAS_Z2_MIN, _ATTACH(Z2_MIN_PIN)); + TERN_(HAS_Z3_MAX, _ATTACH(Z3_MAX_PIN)); + TERN_(HAS_Z3_MIN, _ATTACH(Z3_MIN_PIN)); + TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN)); + TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN)); TERN_(HAS_Z_MIN_PROBE_PIN, _ATTACH(Z_MIN_PROBE_PIN)); - TERN_(HAS_I_MAX, _ATTACH(I_MAX_PIN)); - TERN_(HAS_I_MIN, _ATTACH(I_MIN_PIN)); - TERN_(HAS_J_MAX, _ATTACH(J_MAX_PIN)); - TERN_(HAS_J_MIN, _ATTACH(J_MIN_PIN)); - TERN_(HAS_K_MAX, _ATTACH(K_MAX_PIN)); - TERN_(HAS_K_MIN, _ATTACH(K_MIN_PIN)); + TERN_(HAS_I_MAX, _ATTACH(I_MAX_PIN)); + TERN_(HAS_I_MIN, _ATTACH(I_MIN_PIN)); + TERN_(HAS_J_MAX, _ATTACH(J_MAX_PIN)); + TERN_(HAS_J_MIN, _ATTACH(J_MIN_PIN)); + TERN_(HAS_K_MAX, _ATTACH(K_MAX_PIN)); + TERN_(HAS_K_MIN, _ATTACH(K_MIN_PIN)); + TERN_(HAS_U_MAX, _ATTACH(U_MAX_PIN)); + TERN_(HAS_U_MIN, _ATTACH(U_MIN_PIN)); + TERN_(HAS_V_MAX, _ATTACH(V_MAX_PIN)); + TERN_(HAS_V_MIN, _ATTACH(V_MIN_PIN)); + TERN_(HAS_W_MAX, _ATTACH(W_MAX_PIN)); + TERN_(HAS_W_MIN, _ATTACH(W_MIN_PIN)); } diff --git a/Marlin/src/core/macros.h b/Marlin/src/core/macros.h index fec390b64b..7e20f83803 100644 --- a/Marlin/src/core/macros.h +++ b/Marlin/src/core/macros.h @@ -33,51 +33,6 @@ #define _AXIS(A) (A##_AXIS) -#define _XSTOP_ 0x01 -#define _YSTOP_ 0x02 -#define _ZSTOP_ 0x03 -#define _ISTOP_ 0x04 -#define _JSTOP_ 0x05 -#define _KSTOP_ 0x06 -#define _USTOP_ 0x07 -#define _VSTOP_ 0x08 -#define _WSTOP_ 0x09 -#define _XMIN_ 0x11 -#define _YMIN_ 0x12 -#define _ZMIN_ 0x13 -#define _IMIN_ 0x14 -#define _JMIN_ 0x15 -#define _KMIN_ 0x16 -#define _UMIN_ 0x17 -#define _VMIN_ 0x18 -#define _WMIN_ 0x19 -#define _XMAX_ 0x21 -#define _YMAX_ 0x22 -#define _ZMAX_ 0x23 -#define _IMAX_ 0x24 -#define _JMAX_ 0x25 -#define _KMAX_ 0x26 -#define _UMAX_ 0x27 -#define _VMAX_ 0x28 -#define _WMAX_ 0x29 -#define _XDIAG_ 0x31 -#define _YDIAG_ 0x32 -#define _ZDIAG_ 0x33 -#define _IDIAG_ 0x34 -#define _JDIAG_ 0x35 -#define _KDIAG_ 0x36 -#define _UDIAG_ 0x37 -#define _VDIAG_ 0x38 -#define _WDIAG_ 0x39 -#define _E0DIAG_ 0xE0 -#define _E1DIAG_ 0xE1 -#define _E2DIAG_ 0xE2 -#define _E3DIAG_ 0xE3 -#define _E4DIAG_ 0xE4 -#define _E5DIAG_ 0xE5 -#define _E6DIAG_ 0xE6 -#define _E7DIAG_ 0xE7 - #define _FORCE_INLINE_ __attribute__((__always_inline__)) __inline__ #define FORCE_INLINE __attribute__((always_inline)) inline #define NO_INLINE __attribute__((noinline)) diff --git a/Marlin/src/inc/Changes.h b/Marlin/src/inc/Changes.h index 6fd33debc6..8606cbcc93 100644 --- a/Marlin/src/inc/Changes.h +++ b/Marlin/src/inc/Changes.h @@ -65,7 +65,7 @@ #elif defined(ENDSTOPPULLUP_FIL_RUNOUT) #error "ENDSTOPPULLUP_FIL_RUNOUT is now FIL_RUNOUT_PULLUP." #elif defined(DISABLE_MAX_ENDSTOPS) || defined(DISABLE_MIN_ENDSTOPS) - #error "DISABLE_MAX_ENDSTOPS and DISABLE_MIN_ENDSTOPS deprecated. Use individual USE_*_PLUG options instead." + #error "DISABLE_MAX_ENDSTOPS and DISABLE_MIN_ENDSTOPS deprecated. Endstops are automatically determined." #elif defined(LANGUAGE_INCLUDE) #error "LANGUAGE_INCLUDE has been replaced by LCD_LANGUAGE." #elif defined(EXTRUDER_OFFSET_X) || defined(EXTRUDER_OFFSET_Y) @@ -645,6 +645,20 @@ #error "TFT_SHARED_SPI is now TFT_SHARED_IO." #elif defined(LCD_PINS_ENABLE) #error "LCD_PINS_ENABLE is now LCD_PINS_EN." +#elif ANY(USE_XMIN_PLUG, USE_XMAX_PLUG, USE_YMIN_PLUG, USE_YMAX_PLUG, USE_ZMIN_PLUG, USE_ZMAX_PLUG, \ + USE_IMIN_PLUG, USE_IMAX_PLUG, USE_JMIN_PLUG, USE_JMAX_PLUG, USE_KMIN_PLUG, USE_KMAX_PLUG, \ + USE_UMIN_PLUG, USE_UMAX_PLUG, USE_VMIN_PLUG, USE_VMAX_PLUG, USE_WMIN_PLUG, USE_WMAX_PLUG) + #error "USE_*_PLUG settings are no longer needed and should be removed." +#elif defined(X2_USE_ENDSTOP) + #error "X2_USE_ENDSTOP is obsolete. Instead set X2_STOP_PIN directly. (e.g., 'X2_USE_ENDSTOP _XMAX_' becomes 'X2_STOP_PIN X_MAX_PIN')" +#elif defined(Y2_USE_ENDSTOP) + #error "Y2_USE_ENDSTOP is obsolete. Instead set Y2_STOP_PIN directly. (e.g., 'Y2_USE_ENDSTOP _YMAX_' becomes 'Y2_STOP_PIN Y_MAX_PIN')" +#elif defined(Z2_USE_ENDSTOP) + #error "Z2_USE_ENDSTOP is obsolete. Instead set Z2_STOP_PIN directly. (e.g., 'Z2_USE_ENDSTOP _ZMAX_' becomes 'Z2_STOP_PIN Z_MAX_PIN')" +#elif defined(Z2_USE_ENDSTOP) + #error "Z2_USE_ENDSTOP is obsolete. Instead set Z2_STOP_PIN directly. (e.g., 'Z2_USE_ENDSTOP _ZMAX_' becomes 'Z2_STOP_PIN Z_MAX_PIN')" +#elif defined(Z4_USE_ENDSTOP) + #error "Z4_USE_ENDSTOP is obsolete. Instead set Z4_STOP_PIN directly. (e.g., 'Z4_USE_ENDSTOP _ZMAX_' becomes 'Z4_STOP_PIN Z_MAX_PIN')" #endif // L64xx stepper drivers have been removed diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index f3d80a6c9f..9e8e8ed17f 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -737,17 +737,17 @@ #if ENABLED(X_DUAL_ENDSTOPS) #if X_HOME_TO_MAX #ifndef X2_MAX_ENDSTOP_HIT_STATE - #if X2_USE_ENDSTOP == _XMIN_ + #if X2_STOP_PIN == X_MIN_PIN #define X2_MAX_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE - #elif X2_USE_ENDSTOP == _XMAX_ + #elif X2_STOP_PIN == X_MAX_PIN #define X2_MAX_ENDSTOP_HIT_STATE X_MAX_ENDSTOP_HIT_STATE - #elif X2_USE_ENDSTOP == _YMIN_ + #elif X2_STOP_PIN == Y_MIN_PIN #define X2_MAX_ENDSTOP_HIT_STATE Y_MIN_ENDSTOP_HIT_STATE - #elif X2_USE_ENDSTOP == _YMAX_ + #elif X2_STOP_PIN == Y_MAX_PIN #define X2_MAX_ENDSTOP_HIT_STATE Y_MAX_ENDSTOP_HIT_STATE - #elif X2_USE_ENDSTOP == _ZMIN_ + #elif X2_STOP_PIN == Z_MIN_PIN #define X2_MAX_ENDSTOP_HIT_STATE Z_MIN_ENDSTOP_HIT_STATE - #elif X2_USE_ENDSTOP == _ZMAX_ + #elif X2_STOP_PIN == Z_MAX_PIN #define X2_MAX_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE #endif #endif @@ -759,17 +759,17 @@ #endif #else #ifndef X2_MIN_ENDSTOP_HIT_STATE - #if X2_USE_ENDSTOP == _XMIN_ + #if X2_STOP_PIN == X_MIN_PIN #define X2_MIN_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE - #elif X2_USE_ENDSTOP == _XMAX_ + #elif X2_STOP_PIN == X_MAX_PIN #define X2_MIN_ENDSTOP_HIT_STATE X_MAX_ENDSTOP_HIT_STATE - #elif X2_USE_ENDSTOP == _YMIN_ + #elif X2_STOP_PIN == Y_MIN_PIN #define X2_MIN_ENDSTOP_HIT_STATE Y_MIN_ENDSTOP_HIT_STATE - #elif X2_USE_ENDSTOP == _YMAX_ + #elif X2_STOP_PIN == Y_MAX_PIN #define X2_MIN_ENDSTOP_HIT_STATE Y_MAX_ENDSTOP_HIT_STATE - #elif X2_USE_ENDSTOP == _ZMIN_ + #elif X2_STOP_PIN == Z_MIN_PIN #define X2_MIN_ENDSTOP_HIT_STATE Z_MIN_ENDSTOP_HIT_STATE - #elif X2_USE_ENDSTOP == _ZMAX_ + #elif X2_STOP_PIN == Z_MAX_PIN #define X2_MIN_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE #endif #endif @@ -794,17 +794,17 @@ #if ENABLED(Y_DUAL_ENDSTOPS) #if Y_HOME_TO_MAX #ifndef Y2_MAX_ENDSTOP_HIT_STATE - #if Y2_USE_ENDSTOP == _XMIN_ + #if Y2_STOP_PIN == X_MIN_PIN #define Y2_MAX_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE - #elif Y2_USE_ENDSTOP == _XMAX_ + #elif Y2_STOP_PIN == X_MAX_PIN #define Y2_MAX_ENDSTOP_HIT_STATE X_MAX_ENDSTOP_HIT_STATE - #elif Y2_USE_ENDSTOP == _YMIN_ + #elif Y2_STOP_PIN == Y_MIN_PIN #define Y2_MAX_ENDSTOP_HIT_STATE Y_MIN_ENDSTOP_HIT_STATE - #elif Y2_USE_ENDSTOP == _YMAX_ + #elif Y2_STOP_PIN == Y_MAX_PIN #define Y2_MAX_ENDSTOP_HIT_STATE Y_MAX_ENDSTOP_HIT_STATE - #elif Y2_USE_ENDSTOP == _ZMIN_ + #elif Y2_STOP_PIN == Z_MIN_PIN #define Y2_MAX_ENDSTOP_HIT_STATE Z_MIN_ENDSTOP_HIT_STATE - #elif Y2_USE_ENDSTOP == _ZMAX_ + #elif Y2_STOP_PIN == Z_MAX_PIN #define Y2_MAX_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE #endif #endif @@ -816,17 +816,17 @@ #endif #else #ifndef Y2_MIN_ENDSTOP_HIT_STATE - #if Y2_USE_ENDSTOP == _XMIN_ + #if Y2_STOP_PIN == X_MIN_PIN #define Y2_MIN_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE - #elif Y2_USE_ENDSTOP == _XMAX_ + #elif Y2_STOP_PIN == X_MAX_PIN #define Y2_MIN_ENDSTOP_HIT_STATE X_MAX_ENDSTOP_HIT_STATE - #elif Y2_USE_ENDSTOP == _YMIN_ + #elif Y2_STOP_PIN == Y_MIN_PIN #define Y2_MIN_ENDSTOP_HIT_STATE Y_MIN_ENDSTOP_HIT_STATE - #elif Y2_USE_ENDSTOP == _YMAX_ + #elif Y2_STOP_PIN == Y_MAX_PIN #define Y2_MIN_ENDSTOP_HIT_STATE Y_MAX_ENDSTOP_HIT_STATE - #elif Y2_USE_ENDSTOP == _ZMIN_ + #elif Y2_STOP_PIN == Z_MIN_PIN #define Y2_MIN_ENDSTOP_HIT_STATE Z_MIN_ENDSTOP_HIT_STATE - #elif Y2_USE_ENDSTOP == _ZMAX_ + #elif Y2_STOP_PIN == Z_MAX_PIN #define Y2_MIN_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE #endif #endif @@ -852,17 +852,17 @@ #if Z_HOME_TO_MAX #ifndef Z2_MAX_ENDSTOP_HIT_STATE - #if Z2_USE_ENDSTOP == _XMIN_ + #if Z2_STOP_PIN == X_MIN_PIN #define Z2_MAX_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE - #elif Z2_USE_ENDSTOP == _XMAX_ + #elif Z2_STOP_PIN == X_MAX_PIN #define Z2_MAX_ENDSTOP_HIT_STATE X_MAX_ENDSTOP_HIT_STATE - #elif Z2_USE_ENDSTOP == _YMIN_ + #elif Z2_STOP_PIN == Y_MIN_PIN #define Z2_MAX_ENDSTOP_HIT_STATE Y_MIN_ENDSTOP_HIT_STATE - #elif Z2_USE_ENDSTOP == _YMAX_ + #elif Z2_STOP_PIN == Y_MAX_PIN #define Z2_MAX_ENDSTOP_HIT_STATE Y_MAX_ENDSTOP_HIT_STATE - #elif Z2_USE_ENDSTOP == _ZMIN_ + #elif Z2_STOP_PIN == Z_MIN_PIN #define Z2_MAX_ENDSTOP_HIT_STATE Z_MIN_ENDSTOP_HIT_STATE - #elif Z2_USE_ENDSTOP == _ZMAX_ + #elif Z2_STOP_PIN == Z_MAX_PIN #define Z2_MAX_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE #endif #endif @@ -874,17 +874,17 @@ #endif #else #ifndef Z2_MIN_ENDSTOP_HIT_STATE - #if Z2_USE_ENDSTOP == _XMIN_ + #if Z2_STOP_PIN == X_MIN_PIN #define Z2_MIN_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE - #elif Z2_USE_ENDSTOP == _XMAX_ + #elif Z2_STOP_PIN == X_MAX_PIN #define Z2_MIN_ENDSTOP_HIT_STATE X_MAX_ENDSTOP_HIT_STATE - #elif Z2_USE_ENDSTOP == _YMIN_ + #elif Z2_STOP_PIN == Y_MIN_PIN #define Z2_MIN_ENDSTOP_HIT_STATE Y_MIN_ENDSTOP_HIT_STATE - #elif Z2_USE_ENDSTOP == _YMAX_ + #elif Z2_STOP_PIN == Y_MAX_PIN #define Z2_MIN_ENDSTOP_HIT_STATE Y_MAX_ENDSTOP_HIT_STATE - #elif Z2_USE_ENDSTOP == _ZMIN_ + #elif Z2_STOP_PIN == Z_MIN_PIN #define Z2_MIN_ENDSTOP_HIT_STATE Z_MIN_ENDSTOP_HIT_STATE - #elif Z2_USE_ENDSTOP == _ZMAX_ + #elif Z2_STOP_PIN == Z_MAX_PIN #define Z2_MIN_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE #endif #endif @@ -905,17 +905,17 @@ #if NUM_Z_STEPPERS >= 3 #if Z_HOME_TO_MAX #ifndef Z3_MAX_ENDSTOP_HIT_STATE - #if Z3_USE_ENDSTOP == _XMIN_ + #if Z3_STOP_PIN == X_MIN_PIN #define Z3_MAX_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE - #elif Z3_USE_ENDSTOP == _XMAX_ + #elif Z3_STOP_PIN == X_MAX_PIN #define Z3_MAX_ENDSTOP_HIT_STATE X_MAX_ENDSTOP_HIT_STATE - #elif Z3_USE_ENDSTOP == _YMIN_ + #elif Z3_STOP_PIN == Y_MIN_PIN #define Z3_MAX_ENDSTOP_HIT_STATE Y_MIN_ENDSTOP_HIT_STATE - #elif Z3_USE_ENDSTOP == _YMAX_ + #elif Z3_STOP_PIN == Y_MAX_PIN #define Z3_MAX_ENDSTOP_HIT_STATE Y_MAX_ENDSTOP_HIT_STATE - #elif Z3_USE_ENDSTOP == _ZMIN_ + #elif Z3_STOP_PIN == Z_MIN_PIN #define Z3_MAX_ENDSTOP_HIT_STATE Z_MIN_ENDSTOP_HIT_STATE - #elif Z3_USE_ENDSTOP == _ZMAX_ + #elif Z3_STOP_PIN == Z_MAX_PIN #define Z3_MAX_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE #endif #endif @@ -927,17 +927,17 @@ #endif #else #ifndef Z3_MIN_ENDSTOP_HIT_STATE - #if Z3_USE_ENDSTOP == _XMIN_ + #if Z3_STOP_PIN == X_MIN_PIN #define Z3_MIN_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE - #elif Z3_USE_ENDSTOP == _XMAX_ + #elif Z3_STOP_PIN == X_MAX_PIN #define Z3_MIN_ENDSTOP_HIT_STATE X_MAX_ENDSTOP_HIT_STATE - #elif Z3_USE_ENDSTOP == _YMIN_ + #elif Z3_STOP_PIN == Y_MIN_PIN #define Z3_MIN_ENDSTOP_HIT_STATE Y_MIN_ENDSTOP_HIT_STATE - #elif Z3_USE_ENDSTOP == _YMAX_ + #elif Z3_STOP_PIN == Y_MAX_PIN #define Z3_MIN_ENDSTOP_HIT_STATE Y_MAX_ENDSTOP_HIT_STATE - #elif Z3_USE_ENDSTOP == _ZMIN_ + #elif Z3_STOP_PIN == Z_MIN_PIN #define Z3_MIN_ENDSTOP_HIT_STATE Z_MIN_ENDSTOP_HIT_STATE - #elif Z3_USE_ENDSTOP == _ZMAX_ + #elif Z3_STOP_PIN == Z_MAX_PIN #define Z3_MIN_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE #endif #endif @@ -959,17 +959,17 @@ #if NUM_Z_STEPPERS >= 4 #if Z_HOME_TO_MAX #ifndef Z4_MAX_ENDSTOP_HIT_STATE - #if Z4_USE_ENDSTOP == _XMIN_ + #if Z4_STOP_PIN == X_MIN_PIN #define Z4_MAX_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE - #elif Z4_USE_ENDSTOP == _XMAX_ + #elif Z4_STOP_PIN == X_MAX_PIN #define Z4_MAX_ENDSTOP_HIT_STATE X_MAX_ENDSTOP_HIT_STATE - #elif Z4_USE_ENDSTOP == _YMIN_ + #elif Z4_STOP_PIN == Y_MIN_PIN #define Z4_MAX_ENDSTOP_HIT_STATE Y_MIN_ENDSTOP_HIT_STATE - #elif Z4_USE_ENDSTOP == _YMAX_ + #elif Z4_STOP_PIN == Y_MAX_PIN #define Z4_MAX_ENDSTOP_HIT_STATE Y_MAX_ENDSTOP_HIT_STATE - #elif Z4_USE_ENDSTOP == _ZMIN_ + #elif Z4_STOP_PIN == Z_MIN_PIN #define Z4_MAX_ENDSTOP_HIT_STATE Z_MIN_ENDSTOP_HIT_STATE - #elif Z4_USE_ENDSTOP == _ZMAX_ + #elif Z4_STOP_PIN == Z_MAX_PIN #define Z4_MAX_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE #endif #endif @@ -981,17 +981,17 @@ #endif #else #ifndef Z4_MIN_ENDSTOP_HIT_STATE - #if Z4_USE_ENDSTOP == _XMIN_ + #if Z4_STOP_PIN == X_MIN_PIN #define Z4_MIN_ENDSTOP_HIT_STATE X_MIN_ENDSTOP_HIT_STATE - #elif Z4_USE_ENDSTOP == _XMAX_ + #elif Z4_STOP_PIN == X_MAX_PIN #define Z4_MIN_ENDSTOP_HIT_STATE X_MAX_ENDSTOP_HIT_STATE - #elif Z4_USE_ENDSTOP == _YMIN_ + #elif Z4_STOP_PIN == Y_MIN_PIN #define Z4_MIN_ENDSTOP_HIT_STATE Y_MIN_ENDSTOP_HIT_STATE - #elif Z4_USE_ENDSTOP == _YMAX_ + #elif Z4_STOP_PIN == Y_MAX_PIN #define Z4_MIN_ENDSTOP_HIT_STATE Y_MAX_ENDSTOP_HIT_STATE - #elif Z4_USE_ENDSTOP == _ZMIN_ + #elif Z4_STOP_PIN == Z_MIN_PIN #define Z4_MIN_ENDSTOP_HIT_STATE Z_MIN_ENDSTOP_HIT_STATE - #elif Z4_USE_ENDSTOP == _ZMAX_ + #elif Z4_STOP_PIN == Z_MAX_PIN #define Z4_MIN_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE #endif #endif @@ -1016,58 +1016,58 @@ * Set ENDSTOPPULLUPS for active endstop switches */ #if ENABLED(ENDSTOPPULLUPS) - #if ENABLED(USE_XMAX_PLUG) + #if HAS_X_MAX #define ENDSTOPPULLUP_XMAX #endif - #if ENABLED(USE_YMAX_PLUG) + #if HAS_Y_MAX #define ENDSTOPPULLUP_YMAX #endif - #if ENABLED(USE_ZMAX_PLUG) + #if HAS_Z_MAX #define ENDSTOPPULLUP_ZMAX #endif - #if ENABLED(USE_IMAX_PLUG) + #if HAS_I_MAX #define ENDSTOPPULLUP_IMAX #endif - #if ENABLED(USE_JMAX_PLUG) + #if HAS_J_MAX #define ENDSTOPPULLUP_JMAX #endif - #if ENABLED(USE_KMAX_PLUG) + #if HAS_K_MAX #define ENDSTOPPULLUP_KMAX #endif - #if ENABLED(USE_UMAX_PLUG) + #if HAS_U_MAX #define ENDSTOPPULLUP_UMAX #endif - #if ENABLED(USE_VMAX_PLUG) + #if HAS_V_MAX #define ENDSTOPPULLUP_VMAX #endif - #if ENABLED(USE_WMAX_PLUG) + #if HAS_W_MAX #define ENDSTOPPULLUP_WMAX #endif - #if ENABLED(USE_XMIN_PLUG) + #if HAS_X_MIN #define ENDSTOPPULLUP_XMIN #endif - #if ENABLED(USE_YMIN_PLUG) + #if HAS_Y_MIN #define ENDSTOPPULLUP_YMIN #endif - #if ENABLED(USE_ZMIN_PLUG) + #if HAS_Z_MIN_PIN #define ENDSTOPPULLUP_ZMIN #endif - #if ENABLED(USE_IMIN_PLUG) + #if HAS_I_MIN #define ENDSTOPPULLUP_IMIN #endif - #if ENABLED(USE_JMIN_PLUG) + #if HAS_J_MIN #define ENDSTOPPULLUP_JMIN #endif - #if ENABLED(USE_KMIN_PLUG) + #if HAS_K_MIN #define ENDSTOPPULLUP_KMIN #endif - #if ENABLED(USE_UMIN_PLUG) + #if HAS_U_MIN #define ENDSTOPPULLUP_UMIN #endif - #if ENABLED(USE_VMIN_PLUG) + #if HAS_V_MIN #define ENDSTOPPULLUP_VMIN #endif - #if ENABLED(USE_WMIN_PLUG) + #if HAS_W_MIN #define ENDSTOPPULLUP_WMIN #endif #endif @@ -1076,58 +1076,58 @@ * Set ENDSTOPPULLDOWNS for active endstop switches */ #if ENABLED(ENDSTOPPULLDOWNS) - #if ENABLED(USE_XMAX_PLUG) + #if HAS_X_MAX #define ENDSTOPPULLDOWN_XMAX #endif - #if ENABLED(USE_YMAX_PLUG) + #if HAS_Y_MAX #define ENDSTOPPULLDOWN_YMAX #endif - #if ENABLED(USE_ZMAX_PLUG) + #if HAS_Z_MAX #define ENDSTOPPULLDOWN_ZMAX #endif - #if ENABLED(USE_IMAX_PLUG) + #if HAS_I_MAX #define ENDSTOPPULLDOWN_IMAX #endif - #if ENABLED(USE_JMAX_PLUG) + #if HAS_J_MAX #define ENDSTOPPULLDOWN_JMAX #endif - #if ENABLED(USE_KMAX_PLUG) + #if HAS_K_MAX #define ENDSTOPPULLDOWN_KMAX #endif - #if ENABLED(USE_UMAX_PLUG) + #if HAS_U_MAX #define ENDSTOPPULLDOWN_UMAX #endif - #if ENABLED(USE_VMAX_PLUG) + #if HAS_V_MAX #define ENDSTOPPULLDOWN_VMAX #endif - #if ENABLED(USE_WMAX_PLUG) + #if HAS_W_MAX #define ENDSTOPPULLDOWN_WMAX #endif - #if ENABLED(USE_XMIN_PLUG) + #if HAS_X_MIN #define ENDSTOPPULLDOWN_XMIN #endif - #if ENABLED(USE_YMIN_PLUG) + #if HAS_Y_MIN #define ENDSTOPPULLDOWN_YMIN #endif - #if ENABLED(USE_ZMIN_PLUG) + #if HAS_Z_MIN_PIN #define ENDSTOPPULLDOWN_ZMIN #endif - #if ENABLED(USE_IMIN_PLUG) + #if HAS_I_MIN #define ENDSTOPPULLDOWN_IMIN #endif - #if ENABLED(USE_JMIN_PLUG) + #if HAS_J_MIN #define ENDSTOPPULLDOWN_JMIN #endif - #if ENABLED(USE_KMIN_PLUG) + #if HAS_K_MIN #define ENDSTOPPULLDOWN_KMIN #endif - #if ENABLED(USE_UMIN_PLUG) + #if HAS_U_MIN #define ENDSTOPPULLDOWN_UMIN #endif - #if ENABLED(USE_VMIN_PLUG) + #if HAS_V_MIN #define ENDSTOPPULLDOWN_VMIN #endif - #if ENABLED(USE_WMIN_PLUG) + #if HAS_W_MIN #define ENDSTOPPULLDOWN_WMIN #endif #endif @@ -2060,154 +2060,152 @@ // Endstops and bed probe // -// Is an endstop plug used for extra Z endstops or the probe? -#define IS_PROBE_PIN(A,M) (USES_Z_MIN_PROBE_PIN && Z_MIN_PROBE_PIN == A##_##M##_PIN) -#define IS_X2_ENDSTOP(A,M) (ENABLED(X_DUAL_ENDSTOPS) && X2_USE_ENDSTOP == _##A##M##_) -#define IS_Y2_ENDSTOP(A,M) (ENABLED(Y_DUAL_ENDSTOPS) && Y2_USE_ENDSTOP == _##A##M##_) -#define IS_Z2_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && Z2_USE_ENDSTOP == _##A##M##_) -#define IS_Z3_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 3 && Z3_USE_ENDSTOP == _##A##M##_) -#define IS_Z4_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 4 && Z4_USE_ENDSTOP == _##A##M##_) +#define _HAS_STOP(A,N,M,C) ((A##_HOME_TO_##M || (C+0)) && PIN_EXISTS(A##N##_##M)) -#define _HAS_STOP(A,M) (HAS_##A##_AXIS && PIN_EXISTS(A##_##M) && !IS_PROBE_PIN(A,M) && !IS_X2_ENDSTOP(A,M) && !IS_Y2_ENDSTOP(A,M) && !IS_Z2_ENDSTOP(A,M) && !IS_Z3_ENDSTOP(A,M) && !IS_Z4_ENDSTOP(A,M)) -#if _HAS_STOP(X,MIN) +#if _HAS_STOP(X,,MIN,) #define HAS_X_MIN 1 #endif -#if _HAS_STOP(X,MAX) +#if _HAS_STOP(X,,MAX,ENABLED(DUAL_X_CARRIAGE)) #define HAS_X_MAX 1 #endif -#if _HAS_STOP(Y,MIN) - #define HAS_Y_MIN 1 -#endif -#if _HAS_STOP(Y,MAX) - #define HAS_Y_MAX 1 -#endif -#if _HAS_STOP(Z,MIN) - #define HAS_Z_MIN 1 -#endif -#if _HAS_STOP(Z,MAX) - #define HAS_Z_MAX 1 -#endif -#if _HAS_STOP(I,MIN) - #define HAS_I_MIN 1 -#endif -#if _HAS_STOP(I,MAX) - #define HAS_I_MAX 1 -#endif -#if _HAS_STOP(J,MIN) - #define HAS_J_MIN 1 -#endif -#if _HAS_STOP(J,MAX) - #define HAS_J_MAX 1 -#endif -#if _HAS_STOP(K,MIN) - #define HAS_K_MIN 1 -#endif -#if _HAS_STOP(K,MAX) - #define HAS_K_MAX 1 -#endif -#if _HAS_STOP(U,MIN) - #define HAS_U_MIN 1 -#endif -#if _HAS_STOP(U,MAX) - #define HAS_U_MAX 1 -#endif -#if _HAS_STOP(V,MIN) - #define HAS_V_MIN 1 -#endif -#if _HAS_STOP(V,MAX) - #define HAS_V_MAX 1 -#endif -#if _HAS_STOP(W,MIN) - #define HAS_W_MIN 1 -#endif -#if _HAS_STOP(W,MAX) - #define HAS_W_MAX 1 -#endif -#if PIN_EXISTS(X2_MIN) - #define HAS_X2_MIN 1 -#endif -#if PIN_EXISTS(X2_MAX) - #define HAS_X2_MAX 1 -#endif -#if PIN_EXISTS(Y2_MIN) - #define HAS_Y2_MIN 1 -#endif -#if PIN_EXISTS(Y2_MAX) - #define HAS_Y2_MAX 1 -#endif -#if PIN_EXISTS(Z2_MIN) - #define HAS_Z2_MIN 1 -#endif -#if PIN_EXISTS(Z2_MAX) - #define HAS_Z2_MAX 1 -#endif -#if PIN_EXISTS(Z3_MIN) - #define HAS_Z3_MIN 1 -#endif -#if PIN_EXISTS(Z3_MAX) - #define HAS_Z3_MAX 1 -#endif -#if PIN_EXISTS(Z4_MIN) - #define HAS_Z4_MIN 1 -#endif -#if PIN_EXISTS(Z4_MAX) - #define HAS_Z4_MAX 1 -#endif - #if HAS_X_MIN || HAS_X_MAX #define HAS_X_ENDSTOP 1 #endif -#if HAS_X2_MIN || HAS_X2_MAX - #define HAS_X2_ENDSTOP 1 + +#if _HAS_STOP(Y,,MIN,) + #define HAS_Y_MIN 1 +#elif _HAS_STOP(Y,,MAX,) + #define HAS_Y_MAX 1 #endif #if HAS_Y_MIN || HAS_Y_MAX #define HAS_Y_ENDSTOP 1 #endif -#if HAS_Y2_MIN || HAS_Y2_MAX - #define HAS_Y2_ENDSTOP 1 + +#if _HAS_STOP(Z,,MIN,EITHER(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN, HAS_DELTA_SENSORLESS_PROBING)) + #define HAS_Z_MIN 1 + #if !HAS_DELTA_SENSORLESS_PROBING + #define HAS_Z_MIN_PIN 1 + #endif +#endif +#if _HAS_STOP(Z,,MAX,) + #define HAS_Z_MAX 1 #endif #if HAS_Z_MIN || HAS_Z_MAX #define HAS_Z_ENDSTOP 1 #endif -#if HAS_Z2_MIN || HAS_Z2_MAX - #define HAS_Z2_ENDSTOP 1 -#endif -#if HAS_Z3_MIN || HAS_Z3_MAX - #define HAS_Z3_ENDSTOP 1 -#endif -#if HAS_Z4_MIN || HAS_Z4_MAX - #define HAS_Z4_ENDSTOP 1 + +#if _HAS_STOP(I,,MIN,) + #define HAS_I_MIN 1 +#elif _HAS_STOP(I,,MAX,) + #define HAS_I_MAX 1 #endif #if HAS_I_MIN || HAS_I_MAX #define HAS_I_ENDSTOP 1 #endif + +#if _HAS_STOP(J,,MIN,) + #define HAS_J_MIN 1 +#elif _HAS_STOP(J,,MAX,) + #define HAS_J_MAX 1 +#endif #if HAS_J_MIN || HAS_J_MAX #define HAS_J_ENDSTOP 1 #endif + +#if _HAS_STOP(K,,MIN,) + #define HAS_K_MIN 1 +#elif _HAS_STOP(K,,MAX,) + #define HAS_K_MAX 1 +#endif #if HAS_K_MIN || HAS_K_MAX #define HAS_K_ENDSTOP 1 #endif + +#if _HAS_STOP(U,,MIN,) + #define HAS_U_MIN 1 +#elif _HAS_STOP(U,,MAX,) + #define HAS_U_MAX 1 +#endif #if HAS_U_MIN || HAS_U_MAX #define HAS_U_ENDSTOP 1 #endif + +#if _HAS_STOP(V,,MIN,) + #define HAS_V_MIN 1 +#elif _HAS_STOP(V,,MAX,) + #define HAS_V_MAX 1 +#endif #if HAS_V_MIN || HAS_V_MAX #define HAS_V_ENDSTOP 1 #endif + +#if _HAS_STOP(W,,MIN,) + #define HAS_W_MIN 1 +#elif _HAS_STOP(W,,MAX,) + #define HAS_W_MAX 1 +#endif #if HAS_W_MIN || HAS_W_MAX #define HAS_W_ENDSTOP 1 #endif +#if EITHER(DUAL_X_CARRIAGE, X_DUAL_ENDSTOPS) + #if _HAS_STOP(X,2,MIN,) + #define HAS_X2_MIN 1 + #elif _HAS_STOP(X,2,MAX,) + #define HAS_X2_MAX 1 + #endif + #if HAS_X2_MIN || HAS_X2_MAX + #define HAS_X2_ENDSTOP 1 + #endif +#endif + +#if ENABLED(Y_DUAL_ENDSTOPS) + #if _HAS_STOP(Y,2,MIN,) + #define HAS_Y2_MIN 1 + #elif _HAS_STOP(Y,2,MAX,) + #define HAS_Y2_MAX 1 + #endif + #if HAS_Y2_MIN || HAS_Y2_MAX + #define HAS_Y2_ENDSTOP 1 + #endif +#endif + +#if ENABLED(Z_MULTI_ENDSTOPS) + #if _HAS_STOP(Z,2,MIN,) + #define HAS_Z2_MIN 1 + #elif _HAS_STOP(Z,2,MAX,) + #define HAS_Z2_MAX 1 + #endif + #if HAS_Z2_MIN || HAS_Z2_MAX + #define HAS_Z2_ENDSTOP 1 + #endif + #if NUM_Z_STEPPERS >= 3 + #if _HAS_STOP(Z,3,MIN,) + #define HAS_Z3_MIN 1 + #elif _HAS_STOP(Z,3,MAX,) + #define HAS_Z3_MAX 1 + #endif + #if HAS_Z3_MIN || HAS_Z3_MAX + #define HAS_Z3_ENDSTOP 1 + #endif + #endif + #if NUM_Z_STEPPERS >= 4 + #if _HAS_STOP(Z,4,MIN,) + #define HAS_Z4_MIN 1 + #elif _HAS_STOP(Z,4,MAX,) + #define HAS_Z4_MAX 1 + #endif + #if HAS_Z4_MIN || HAS_Z4_MAX + #define HAS_Z4_ENDSTOP 1 + #endif + #endif +#endif + #if HAS_BED_PROBE && PIN_EXISTS(Z_MIN_PROBE) #define HAS_Z_MIN_PROBE_PIN 1 #endif #undef _HAS_STOP -#undef IS_PROBE_PIN -#undef IS_X2_ENDSTOP -#undef IS_Y2_ENDSTOP -#undef IS_Z2_ENDSTOP -#undef IS_Z3_ENDSTOP -#undef IS_Z4_ENDSTOP // // ADC Temp Sensors (Thermistor or Thermocouple with amplifier ADC interface) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 39e27ce3aa..35da7935de 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1379,9 +1379,7 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #error "SENSORLESS_PROBING requires a TMC2130/2160/2209/5130/5160 driver on Z and Z_STALL_SENSITIVITY." #endif #elif ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) - #if DISABLED(USE_ZMIN_PLUG) - #error "Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN requires USE_ZMIN_PLUG to be enabled." - #elif !HAS_Z_MIN + #if !HAS_Z_MIN_PIN #error "Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN requires the Z_MIN_PIN to be defined." #elif Z_MIN_PROBE_ENDSTOP_HIT_STATE != Z_MIN_ENDSTOP_HIT_STATE #error "Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN requires Z_MIN_ENDSTOP_HIT_STATE to match Z_MIN_PROBE_ENDSTOP_HIT_STATE." @@ -1772,7 +1770,7 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #elif !GOOD_AXIS_PINS(X2) #error "DUAL_X_CARRIAGE requires X2 stepper pins to be defined." #elif !HAS_X_MAX - #error "DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop." + #error "DUAL_X_CARRIAGE requires an X_MAX_PIN in addition to the X_MIN_PIN." #elif !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS) #error "DUAL_X_CARRIAGE requires X2_HOME_POS, X2_MIN_POS, and X2_MAX_POS." #elif X_HOME_TO_MAX || X2_HOME_TO_MIN @@ -2302,90 +2300,49 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L /** * Endstop Tests */ - -#define _PLUG_UNUSED_TEST(A,P) (DISABLED(USE_##P##MIN_PLUG, USE_##P##MAX_PLUG) \ - && !(ENABLED(A##_DUAL_ENDSTOPS) && WITHIN(A##2_USE_ENDSTOP, _##P##MAX_, _##P##MIN_)) \ - && !(ENABLED(A##_MULTI_ENDSTOPS) && WITHIN(A##2_USE_ENDSTOP, _##P##MAX_, _##P##MIN_)) ) -#define _AXIS_PLUG_UNUSED_TEST(A) (HAS_##A##_A NUM_AXIS_GANG(&& _PLUG_UNUSED_TEST(A,X), && _PLUG_UNUSED_TEST(A,Y), && _PLUG_UNUSED_TEST(A,Z), \ - && _PLUG_UNUSED_TEST(A,I), && _PLUG_UNUSED_TEST(A,J), && _PLUG_UNUSED_TEST(A,K), \ - && _PLUG_UNUSED_TEST(A,U), && _PLUG_UNUSED_TEST(A,V), && _PLUG_UNUSED_TEST(A,W) ) ) - -// A machine with endstops must have a minimum of 3 #if HAS_ENDSTOPS - #if _AXIS_PLUG_UNUSED_TEST(X) - #error "You must enable USE_XMIN_PLUG or USE_XMAX_PLUG." - #endif - #if _AXIS_PLUG_UNUSED_TEST(Y) - #error "You must enable USE_YMIN_PLUG or USE_YMAX_PLUG." - #endif - #if _AXIS_PLUG_UNUSED_TEST(Z) - #error "You must enable USE_ZMIN_PLUG or USE_ZMAX_PLUG." - #endif - #if _AXIS_PLUG_UNUSED_TEST(I) - #error "You must enable USE_IMIN_PLUG or USE_IMAX_PLUG." - #endif - #if _AXIS_PLUG_UNUSED_TEST(J) - #error "You must enable USE_JMIN_PLUG or USE_JMAX_PLUG." - #endif - #if _AXIS_PLUG_UNUSED_TEST(K) - #error "You must enable USE_KMIN_PLUG or USE_KMAX_PLUG." - #endif - #if _AXIS_PLUG_UNUSED_TEST(U) - #error "You must enable USE_UMIN_PLUG or USE_UMAX_PLUG." - #endif - #if _AXIS_PLUG_UNUSED_TEST(V) - #error "You must enable USE_VMIN_PLUG or USE_VMAX_PLUG." - #endif - #if _AXIS_PLUG_UNUSED_TEST(W) - #error "You must enable USE_WMIN_PLUG or USE_WMAX_PLUG." - #endif - // Delta and Cartesian use 3 homing endstops #if NONE(IS_SCARA, SPI_ENDSTOPS) - #if X_HOME_TO_MIN && DISABLED(USE_XMIN_PLUG) - #error "Enable USE_XMIN_PLUG when homing X to MIN." - #elif X_HOME_TO_MAX && DISABLED(USE_XMAX_PLUG) - #error "Enable USE_XMAX_PLUG when homing X to MAX." - #elif Y_HOME_TO_MIN && DISABLED(USE_YMIN_PLUG) - #error "Enable USE_YMIN_PLUG when homing Y to MIN." - #elif Y_HOME_TO_MAX && DISABLED(USE_YMAX_PLUG) - #error "Enable USE_YMAX_PLUG when homing Y to MAX." - #elif I_HOME_TO_MIN && DISABLED(USE_IMIN_PLUG) - #error "Enable USE_IMIN_PLUG when homing I to MIN." - #elif I_HOME_TO_MAX && DISABLED(USE_IMAX_PLUG) - #error "Enable USE_IMAX_PLUG when homing I to MAX." - #elif J_HOME_TO_MIN && DISABLED(USE_JMIN_PLUG) - #error "Enable USE_JMIN_PLUG when homing J to MIN." - #elif J_HOME_TO_MAX && DISABLED(USE_JMAX_PLUG) - #error "Enable USE_JMAX_PLUG when homing J to MAX." - #elif K_HOME_TO_MIN && DISABLED(USE_KMIN_PLUG) - #error "Enable USE_KMIN_PLUG when homing K to MIN." - #elif K_HOME_TO_MAX && DISABLED(USE_KMAX_PLUG) - #error "Enable USE_KMAX_PLUG when homing K to MAX." - #elif U_HOME_TO_MIN && DISABLED(USE_UMIN_PLUG) - #error "Enable USE_UMIN_PLUG when homing U to MIN." - #elif U_HOME_TO_MAX && DISABLED(USE_UMAX_PLUG) - #error "Enable USE_UMAX_PLUG when homing U to MAX." - #elif V_HOME_TO_MIN && DISABLED(USE_VMIN_PLUG) - #error "Enable USE_VMIN_PLUG when homing V to MIN." - #elif V_HOME_TO_MAX && DISABLED(USE_VMAX_PLUG) - #error "Enable USE_VMAX_PLUG when homing V to MAX." - #elif W_HOME_TO_MIN && DISABLED(USE_WMIN_PLUG) - #error "Enable USE_WMIN_PLUG when homing W to MIN." - #elif W_HOME_TO_MAX && DISABLED(USE_WMAX_PLUG) - #error "Enable USE_WMAX_PLUG when homing W to MAX." + #if X_HOME_TO_MIN && !PIN_EXISTS(X_MIN) + #error "X_MIN_PIN (or X_STOP_PIN) is required for X axis homing." + #elif X_HOME_TO_MAX && !PIN_EXISTS(X_MAX) + #error "X_MAX_PIN (or X_STOP_PIN) is required for X axis homing." + #elif Y_HOME_TO_MIN && !PIN_EXISTS(Y_MIN) + #error "Y_MIN_PIN (or Y_STOP_PIN) is required for Y axis homing." + #elif Y_HOME_TO_MAX && !PIN_EXISTS(Y_MAX) + #error "Y_MAX_PIN (or Y_STOP_PIN) is required for Y axis homing." + #elif I_HOME_TO_MIN && !PIN_EXISTS(I_MIN) + #error "I_MIN_PIN (or I_STOP_PIN) is required for I axis homing." + #elif I_HOME_TO_MAX && !PIN_EXISTS(I_MAX) + #error "I_MAX_PIN (or I_STOP_PIN) is required for I axis homing." + #elif J_HOME_TO_MIN && !PIN_EXISTS(J_MIN) + #error "J_MIN_PIN (or J_STOP_PIN) is required for J axis homing." + #elif J_HOME_TO_MAX && !PIN_EXISTS(J_MAX) + #error "J_MAX_PIN (or J_STOP_PIN) is required for J axis homing." + #elif K_HOME_TO_MIN && !PIN_EXISTS(K_MIN) + #error "K_MIN_PIN (or K_STOP_PIN) is required for K axis homing." + #elif K_HOME_TO_MAX && !PIN_EXISTS(K_MAX) + #error "K_MAX_PIN (or K_STOP_PIN) is required for K axis homing." + #elif U_HOME_TO_MIN && !PIN_EXISTS(U_MIN) + #error "U_MIN_PIN (or U_STOP_PIN) is required for U axis homing." + #elif U_HOME_TO_MAX && !PIN_EXISTS(U_MAX) + #error "U_MAX_PIN (or U_STOP_PIN) is required for U axis homing." + #elif V_HOME_TO_MIN && !PIN_EXISTS(V_MIN) + #error "V_MIN_PIN (or V_STOP_PIN) is required for V axis homing." + #elif V_HOME_TO_MAX && !PIN_EXISTS(V_MAX) + #error "V_MAX_PIN (or V_STOP_PIN) is required for V axis homing." + #elif W_HOME_TO_MIN && !PIN_EXISTS(W_MIN) + #error "W_MIN_PIN (or W_STOP_PIN) is required for W axis homing." + #elif W_HOME_TO_MAX && !PIN_EXISTS(W_MAX) + #error "W_MAX_PIN (or W_STOP_PIN) is required for W axis homing." #endif #endif - // Z homing direction and plug usage flags - #if Z_HOME_TO_MIN && NONE(USE_ZMIN_PLUG, HOMING_Z_WITH_PROBE) - #error "Enable USE_ZMIN_PLUG when homing Z to MIN." - #elif Z_HOME_TO_MAX && ENABLED(USE_PROBE_FOR_Z_HOMING) + // Z homing requirements + #if Z_HOME_TO_MAX && ENABLED(USE_PROBE_FOR_Z_HOMING) #error "Z_HOME_DIR must be -1 when homing Z with the probe." #elif BOTH(HOMING_Z_WITH_PROBE, Z_MULTI_ENDSTOPS) #error "Z_MULTI_ENDSTOPS is incompatible with USE_PROBE_FOR_Z_HOMING." - #elif Z_HOME_TO_MAX && DISABLED(USE_ZMAX_PLUG) - #error "Enable USE_ZMAX_PLUG when homing Z to MAX." #endif #endif @@ -2397,26 +2354,26 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #if ENABLED(X_DUAL_ENDSTOPS) #if ENABLED(DELTA) #error "X_DUAL_ENDSTOPS is not compatible with DELTA." - #elif !X2_USE_ENDSTOP - #error "X2_USE_ENDSTOP must be set with X_DUAL_ENDSTOPS." + #elif !HAS_X2_ENDSTOP + #error "X2 Endstop Pin must be defined for X_DUAL_ENDSTOPS." #endif #endif #if ENABLED(Y_DUAL_ENDSTOPS) #if ENABLED(DELTA) #error "Y_DUAL_ENDSTOPS is not compatible with DELTA." - #elif !Y2_USE_ENDSTOP - #error "Y2_USE_ENDSTOP must be set with Y_DUAL_ENDSTOPS." + #elif !HAS_Y2_ENDSTOP + #error "Y2 Endstop Pin must be defined for Y_DUAL_ENDSTOPS." #endif #endif #if ENABLED(Z_MULTI_ENDSTOPS) #if ENABLED(DELTA) #error "Z_MULTI_ENDSTOPS is not compatible with DELTA." - #elif !Z2_USE_ENDSTOP - #error "Z2_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS." - #elif !Z3_USE_ENDSTOP && NUM_Z_STEPPERS >= 3 - #error "Z3_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS and Z3_DRIVER_TYPE." - #elif !Z4_USE_ENDSTOP && NUM_Z_STEPPERS >= 4 - #error "Z4_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS and Z4_DRIVER_TYPE." + #elif !HAS_Z2_ENDSTOP + #error "Z2 Endstop Pin must be defined for Z_MULTI_ENDSTOPS." + #elif NUM_Z_STEPPERS >= 3 && !HAS_Z3_ENDSTOP + #error "Z3 Endstop Pin must be defined for Z_MULTI_ENDSTOPS and Z3_DRIVER_TYPE." + #elif NUM_Z_STEPPERS >= 4 && !HAS_Z4_ENDSTOP + #error "Z4 Endstop Pin must be defined for Z_MULTI_ENDSTOPS and Z4_DRIVER_TYPE." #endif #endif @@ -3310,10 +3267,12 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L * TMC SPI Chaining */ #define IN_CHAIN(A) A##_CHAIN_POS > 0 -#if IN_CHAIN(X ) || IN_CHAIN(Y ) || IN_CHAIN(Z ) || IN_CHAIN(X2) || IN_CHAIN(Y2) || IN_CHAIN(Z2) || IN_CHAIN(Z3) || IN_CHAIN(Z4) \ +#if IN_CHAIN(X) || IN_CHAIN(Y) || IN_CHAIN(Z) || IN_CHAIN(I) || IN_CHAIN(J) || IN_CHAIN(K) || IN_CHAIN(U) || IN_CHAIN(V) || IN_CHAIN(W) \ + || IN_CHAIN(X2) || IN_CHAIN(Y2) || IN_CHAIN(Z2) || IN_CHAIN(Z3) || IN_CHAIN(Z4) \ || IN_CHAIN(E0) || IN_CHAIN(E1) || IN_CHAIN(E2) || IN_CHAIN(E3) || IN_CHAIN(E4) || IN_CHAIN(E5) || IN_CHAIN(E6) || IN_CHAIN(E7) #define BAD_CHAIN(A) (IN_CHAIN(A) && !PIN_EXISTS(A##_CS)) - #if BAD_CHAIN(X ) || BAD_CHAIN(Y ) || BAD_CHAIN(Z ) || BAD_CHAIN(X2) || BAD_CHAIN(Y2) || BAD_CHAIN(Z2) || BAD_CHAIN(Z3) || BAD_CHAIN(Z4) \ + #if BAD_CHAIN(X) || BAD_CHAIN(Y) || BAD_CHAIN(Z) || BAD_CHAIN(I) || BAD_CHAIN(J) || BAD_CHAIN(K) || BAD_CHAIN(U) || BAD_CHAIN(V) || BAD_CHAIN(W) \ + || BAD_CHAIN(X2) || BAD_CHAIN(Y2) || BAD_CHAIN(Z2) || BAD_CHAIN(Z3) || BAD_CHAIN(Z4) \ || BAD_CHAIN(E0) || BAD_CHAIN(E1) || BAD_CHAIN(E2) || BAD_CHAIN(E3) || BAD_CHAIN(E4) || BAD_CHAIN(E5) || BAD_CHAIN(E6) || BAD_CHAIN(E7) #error "All chained TMC drivers need a CS pin." #else @@ -3361,9 +3320,8 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #define CS_COMPARE E7_CS_PIN #endif #define BAD_CS_PIN(A) (IN_CHAIN(A) && A##_CS_PIN != CS_COMPARE) - #if BAD_CS_PIN(X ) || BAD_CS_PIN(Y ) || BAD_CS_PIN(Z ) || BAD_CS_PIN(X2) || BAD_CS_PIN(Y2) || BAD_CS_PIN(Z2) || BAD_CS_PIN(Z3) || BAD_CS_PIN(Z4) \ - || BAD_CS_PIN(I) || BAD_CS_PIN(J) || BAD_CS_PIN(K) \ - || BAD_CS_PIN(U) || BAD_CS_PIN(V) || BAD_CS_PIN(W) \ + #if BAD_CS_PIN(X) || BAD_CS_PIN(Y) || BAD_CS_PIN(Z) || BAD_CS_PIN(I) || BAD_CS_PIN(J) || BAD_CS_PIN(K) || BAD_CS_PIN(U) || BAD_CS_PIN(V) || BAD_CS_PIN(W) \ + || BAD_CS_PIN(X2) || BAD_CS_PIN(Y2) || BAD_CS_PIN(Z2) || BAD_CS_PIN(Z3) || BAD_CS_PIN(Z4) \ || BAD_CS_PIN(E0) || BAD_CS_PIN(E1) || BAD_CS_PIN(E2) || BAD_CS_PIN(E3) || BAD_CS_PIN(E4) || BAD_CS_PIN(E5) || BAD_CS_PIN(E6) || BAD_CS_PIN(E7) #error "All chained TMC drivers must use the same CS pin." #endif diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index 82aadf7d77..c7773eaabc 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -95,46 +95,40 @@ #warning "Note: Auto-assigned X2_CS_PIN to an unused En_CS_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" #endif #if AUTO_ASSIGNED_X2_DIAG - #if X2_USE_ENDSTOP == _XMIN_ - #warning "Note: Auto-assigned X2_DIAG_PIN to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif X2_USE_ENDSTOP == _XMAX_ - #warning "Note: Auto-assigned X2_DIAG_PIN to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif X2_USE_ENDSTOP == _XSTOP_ - #warning "Note: Auto-assigned X2_DIAG_PIN to X_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif X2_USE_ENDSTOP == _YMIN_ - #warning "Note: Auto-assigned X2_DIAG_PIN to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif X2_USE_ENDSTOP == _YMAX_ - #warning "Note: Auto-assigned X2_DIAG_PIN to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif X2_USE_ENDSTOP == _YSTOP_ - #warning "Note: Auto-assigned X2_DIAG_PIN to Y_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif X2_USE_ENDSTOP == _ZMIN_ - #warning "Note: Auto-assigned X2_DIAG_PIN to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif X2_USE_ENDSTOP == _ZMAX_ - #warning "Note: Auto-assigned X2_DIAG_PIN to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif X2_USE_ENDSTOP == _ZSTOP_ - #warning "Note: Auto-assigned X2_DIAG_PIN to Z_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif X2_USE_ENDSTOP == _XDIAG_ - #warning "Note: Auto-assigned X2_DIAG_PIN to X_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif X2_USE_ENDSTOP == _YDIAG_ - #warning "Note: Auto-assigned X2_DIAG_PIN to Y_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif X2_USE_ENDSTOP == _ZDIAG_ - #warning "Note: Auto-assigned X2_DIAG_PIN to Z_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif X2_USE_ENDSTOP == _E0DIAG_ - #warning "Note: Auto-assigned X2_DIAG_PIN to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif X2_USE_ENDSTOP == _E1DIAG_ - #warning "Note: Auto-assigned X2_DIAG_PIN to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif X2_USE_ENDSTOP == _E2DIAG_ - #warning "Note: Auto-assigned X2_DIAG_PIN to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif X2_USE_ENDSTOP == _E3DIAG_ - #warning "Note: Auto-assigned X2_DIAG_PIN to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif X2_USE_ENDSTOP == _E4DIAG_ - #warning "Note: Auto-assigned X2_DIAG_PIN to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif X2_USE_ENDSTOP == _E5DIAG_ - #warning "Note: Auto-assigned X2_DIAG_PIN to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif X2_USE_ENDSTOP == _E6DIAG_ - #warning "Note: Auto-assigned X2_DIAG_PIN to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif X2_USE_ENDSTOP == _E7DIAG_ - #warning "Note: Auto-assigned X2_DIAG_PIN to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #if X2_STOP_PIN == X_MIN_PIN + #warning "Note: Auto-assigned X2 sensorless endstop to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif X2_STOP_PIN == X_MAX_PIN + #warning "Note: Auto-assigned X2 sensorless endstop to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif X2_STOP_PIN == X_STOP_PIN + #warning "Note: Auto-assigned X2 sensorless endstop to X_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif X2_STOP_PIN == Y_MIN_PIN + #warning "Note: Auto-assigned X2 sensorless endstop to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif X2_STOP_PIN == Y_MAX_PIN + #warning "Note: Auto-assigned X2 sensorless endstop to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif X2_STOP_PIN == Y_STOP_PIN + #warning "Note: Auto-assigned X2 sensorless endstop to Y_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif X2_STOP_PIN == Z_MIN_PIN + #warning "Note: Auto-assigned X2 sensorless endstop to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif X2_STOP_PIN == Z_MAX_PIN + #warning "Note: Auto-assigned X2 sensorless endstop to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif X2_STOP_PIN == Z_STOP_PIN + #warning "Note: Auto-assigned X2 sensorless endstop to Z_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif X2_STOP_PIN == E0_DIAG_PIN + #warning "Note: Auto-assigned X2 sensorless endstop to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif X2_STOP_PIN == E1_DIAG_PIN + #warning "Note: Auto-assigned X2 sensorless endstop to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif X2_STOP_PIN == E2_DIAG_PIN + #warning "Note: Auto-assigned X2 sensorless endstop to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif X2_STOP_PIN == E3_DIAG_PIN + #warning "Note: Auto-assigned X2 sensorless endstop to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif X2_STOP_PIN == E4_DIAG_PIN + #warning "Note: Auto-assigned X2 sensorless endstop to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif X2_STOP_PIN == E5_DIAG_PIN + #warning "Note: Auto-assigned X2 sensorless endstop to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif X2_STOP_PIN == E6_DIAG_PIN + #warning "Note: Auto-assigned X2 sensorless endstop to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif X2_STOP_PIN == E7_DIAG_PIN + #warning "Note: Auto-assigned X2 sensorless endstop to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" #endif #endif #if AUTO_ASSIGNED_Y2_STEPPER @@ -153,46 +147,40 @@ #warning "Note: Auto-assigned Y2_CS_PIN to an unused En_CS_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" #endif #if AUTO_ASSIGNED_Y2_DIAG - #if Y2_USE_ENDSTOP == _XMIN_ - #warning "Note: Auto-assigned Y2_DIAG_PIN to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Y2_USE_ENDSTOP == _XMAX_ - #warning "Note: Auto-assigned Y2_DIAG_PIN to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Y2_USE_ENDSTOP == _XSTOP_ - #warning "Note: Auto-assigned Y2_DIAG_PIN to X_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Y2_USE_ENDSTOP == _YMIN_ - #warning "Note: Auto-assigned Y2_DIAG_PIN to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Y2_USE_ENDSTOP == _YMAX_ - #warning "Note: Auto-assigned Y2_DIAG_PIN to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Y2_USE_ENDSTOP == _YSTOP_ - #warning "Note: Auto-assigned Y2_DIAG_PIN to Y_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Y2_USE_ENDSTOP == _ZMIN_ - #warning "Note: Auto-assigned Y2_DIAG_PIN to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Y2_USE_ENDSTOP == _ZMAX_ - #warning "Note: Auto-assigned Y2_DIAG_PIN to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Y2_USE_ENDSTOP == _ZSTOP_ - #warning "Note: Auto-assigned Y2_DIAG_PIN to Z_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Y2_USE_ENDSTOP == _XDIAG_ - #warning "Note: Auto-assigned Y2_DIAG_PIN to X_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Y2_USE_ENDSTOP == _YDIAG_ - #warning "Note: Auto-assigned Y2_DIAG_PIN to Y_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Y2_USE_ENDSTOP == _ZDIAG_ - #warning "Note: Auto-assigned Y2_DIAG_PIN to Z_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Y2_USE_ENDSTOP == _E0DIAG_ - #warning "Note: Auto-assigned Y2_DIAG_PIN to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Y2_USE_ENDSTOP == _E1DIAG_ - #warning "Note: Auto-assigned Y2_DIAG_PIN to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Y2_USE_ENDSTOP == _E2DIAG_ - #warning "Note: Auto-assigned Y2_DIAG_PIN to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Y2_USE_ENDSTOP == _E3DIAG_ - #warning "Note: Auto-assigned Y2_DIAG_PIN to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Y2_USE_ENDSTOP == _E4DIAG_ - #warning "Note: Auto-assigned Y2_DIAG_PIN to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Y2_USE_ENDSTOP == _E5DIAG_ - #warning "Note: Auto-assigned Y2_DIAG_PIN to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Y2_USE_ENDSTOP == _E6DIAG_ - #warning "Note: Auto-assigned Y2_DIAG_PIN to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Y2_USE_ENDSTOP == _E7DIAG_ - #warning "Note: Auto-assigned Y2_DIAG_PIN to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #if Y2_USE_ENDSTOP == X_MIN_PIN + #warning "Note: Auto-assigned Y2 sensorless endstop to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Y2_STOP_PIN == X_MAX_PIN + #warning "Note: Auto-assigned Y2 sensorless endstop to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Y2_STOP_PIN == X_STOP_PIN + #warning "Note: Auto-assigned Y2 sensorless endstop to X_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Y2_USE_ENDSTOP == Y_MIN_PIN + #warning "Note: Auto-assigned Y2 sensorless endstop to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Y2_STOP_PIN == Y_MAX_PIN + #warning "Note: Auto-assigned Y2 sensorless endstop to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Y2_STOP_PIN == Y_STOP_PIN + #warning "Note: Auto-assigned Y2 sensorless endstop to Y_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Y2_USE_ENDSTOP == Z_MIN_PIN + #warning "Note: Auto-assigned Y2 sensorless endstop to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Y2_STOP_PIN == Z_MAX_PIN + #warning "Note: Auto-assigned Y2 sensorless endstop to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Y2_STOP_PIN == Z_STOP_PIN + #warning "Note: Auto-assigned Y2 sensorless endstop to Z_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Y2_STOP_PIN == E0_DIAG_PIN + #warning "Note: Auto-assigned Y2 sensorless endstop to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Y2_STOP_PIN == E1_DIAG_PIN + #warning "Note: Auto-assigned Y2 sensorless endstop to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Y2_STOP_PIN == E2_DIAG_PIN + #warning "Note: Auto-assigned Y2 sensorless endstop to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Y2_STOP_PIN == E3_DIAG_PIN + #warning "Note: Auto-assigned Y2 sensorless endstop to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Y2_STOP_PIN == E4_DIAG_PIN + #warning "Note: Auto-assigned Y2 sensorless endstop to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Y2_STOP_PIN == E5_DIAG_PIN + #warning "Note: Auto-assigned Y2 sensorless endstop to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Y2_STOP_PIN == E6_DIAG_PIN + #warning "Note: Auto-assigned Y2 sensorless endstop to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Y2_STOP_PIN == E7_DIAG_PIN + #warning "Note: Auto-assigned Y2 sensorless endstop to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" #endif #endif #if AUTO_ASSIGNED_Z2_STEPPER @@ -211,46 +199,40 @@ #warning "Note: Auto-assigned Z2_CS_PIN to an unused En_CS_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" #endif #if AUTO_ASSIGNED_Z2_DIAG - #if Z2_USE_ENDSTOP == _XMIN_ - #warning "Note: Auto-assigned Z2_DIAG_PIN to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z2_USE_ENDSTOP == _XMAX_ - #warning "Note: Auto-assigned Z2_DIAG_PIN to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z2_USE_ENDSTOP == _XSTOP_ - #warning "Note: Auto-assigned Z2_DIAG_PIN to X_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z2_USE_ENDSTOP == _YMIN_ - #warning "Note: Auto-assigned Z2_DIAG_PIN to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z2_USE_ENDSTOP == _YMAX_ - #warning "Note: Auto-assigned Z2_DIAG_PIN to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z2_USE_ENDSTOP == _YSTOP_ - #warning "Note: Auto-assigned Z2_DIAG_PIN to Y_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z2_USE_ENDSTOP == _ZMIN_ - #warning "Note: Auto-assigned Z2_DIAG_PIN to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z2_USE_ENDSTOP == _ZMAX_ - #warning "Note: Auto-assigned Z2_DIAG_PIN to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z2_USE_ENDSTOP == _ZSTOP_ - #warning "Note: Auto-assigned Z2_DIAG_PIN to Z_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z2_USE_ENDSTOP == _XDIAG_ - #warning "Note: Auto-assigned Z2_DIAG_PIN to X_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z2_USE_ENDSTOP == _YDIAG_ - #warning "Note: Auto-assigned Z2_DIAG_PIN to Y_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z2_USE_ENDSTOP == _ZDIAG_ - #warning "Note: Auto-assigned Z2_DIAG_PIN to Z_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z2_USE_ENDSTOP == _E0DIAG_ - #warning "Note: Auto-assigned Z2_DIAG_PIN to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z2_USE_ENDSTOP == _E1DIAG_ - #warning "Note: Auto-assigned Z2_DIAG_PIN to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z2_USE_ENDSTOP == _E2DIAG_ - #warning "Note: Auto-assigned Z2_DIAG_PIN to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z2_USE_ENDSTOP == _E3DIAG_ - #warning "Note: Auto-assigned Z2_DIAG_PIN to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z2_USE_ENDSTOP == _E4DIAG_ - #warning "Note: Auto-assigned Z2_DIAG_PIN to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z2_USE_ENDSTOP == _E5DIAG_ - #warning "Note: Auto-assigned Z2_DIAG_PIN to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z2_USE_ENDSTOP == _E6DIAG_ - #warning "Note: Auto-assigned Z2_DIAG_PIN to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z2_USE_ENDSTOP == _E7DIAG_ - #warning "Note: Auto-assigned Z2_DIAG_PIN to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #if Z2_USE_ENDSTOP == X_MIN_PIN + #warning "Note: Auto-assigned Z2 sensorless endstop to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z2_STOP_PIN == X_MAX_PIN + #warning "Note: Auto-assigned Z2 sensorless endstop to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z2_STOP_PIN == X_STOP_PIN + #warning "Note: Auto-assigned Z2 sensorless endstop to X_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z2_USE_ENDSTOP == Y_MIN_PIN + #warning "Note: Auto-assigned Z2 sensorless endstop to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z2_STOP_PIN == Y_MAX_PIN + #warning "Note: Auto-assigned Z2 sensorless endstop to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z2_STOP_PIN == Y_STOP_PIN + #warning "Note: Auto-assigned Z2 sensorless endstop to Y_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z2_USE_ENDSTOP == Z_MIN_PIN + #warning "Note: Auto-assigned Z2 sensorless endstop to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z2_STOP_PIN == Z_MAX_PIN + #warning "Note: Auto-assigned Z2 sensorless endstop to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z2_STOP_PIN == Z_STOP_PIN + #warning "Note: Auto-assigned Z2 sensorless endstop to Z_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z2_STOP_PIN == E0_DIAG_PIN + #warning "Note: Auto-assigned Z2 sensorless endstop to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z2_STOP_PIN == E1_DIAG_PIN + #warning "Note: Auto-assigned Z2 sensorless endstop to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z2_STOP_PIN == E2_DIAG_PIN + #warning "Note: Auto-assigned Z2 sensorless endstop to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z2_STOP_PIN == E3_DIAG_PIN + #warning "Note: Auto-assigned Z2 sensorless endstop to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z2_STOP_PIN == E4_DIAG_PIN + #warning "Note: Auto-assigned Z2 sensorless endstop to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z2_STOP_PIN == E5_DIAG_PIN + #warning "Note: Auto-assigned Z2 sensorless endstop to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z2_STOP_PIN == E6_DIAG_PIN + #warning "Note: Auto-assigned Z2 sensorless endstop to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z2_STOP_PIN == E7_DIAG_PIN + #warning "Note: Auto-assigned Z2 sensorless endstop to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" #endif #endif #if AUTO_ASSIGNED_Z3_STEPPER @@ -269,46 +251,40 @@ #warning "Note: Auto-assigned Z3_MS3_PIN to an unused En_MS3_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" #endif #if AUTO_ASSIGNED_Z3_DIAG - #if Z3_USE_ENDSTOP == _XMIN_ - #warning "Note: Auto-assigned Z3_DIAG_PIN to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z3_USE_ENDSTOP == _XMAX_ - #warning "Note: Auto-assigned Z3_DIAG_PIN to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z3_USE_ENDSTOP == _XSTOP_ - #warning "Note: Auto-assigned Z3_DIAG_PIN to X_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z3_USE_ENDSTOP == _YMIN_ - #warning "Note: Auto-assigned Z3_DIAG_PIN to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z3_USE_ENDSTOP == _YMAX_ - #warning "Note: Auto-assigned Z3_DIAG_PIN to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z3_USE_ENDSTOP == _YSTOP_ - #warning "Note: Auto-assigned Z3_DIAG_PIN to Y_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z3_USE_ENDSTOP == _ZMIN_ - #warning "Note: Auto-assigned Z3_DIAG_PIN to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z3_USE_ENDSTOP == _ZMAX_ - #warning "Note: Auto-assigned Z3_DIAG_PIN to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z3_USE_ENDSTOP == _ZSTOP_ - #warning "Note: Auto-assigned Z3_DIAG_PIN to Z_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z3_USE_ENDSTOP == _XDIAG_ - #warning "Note: Auto-assigned Z3_DIAG_PIN to X_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z3_USE_ENDSTOP == _YDIAG_ - #warning "Note: Auto-assigned Z3_DIAG_PIN to Y_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z3_USE_ENDSTOP == _ZDIAG_ - #warning "Note: Auto-assigned Z3_DIAG_PIN to Z_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z3_USE_ENDSTOP == _E0DIAG_ - #warning "Note: Auto-assigned Z3_DIAG_PIN to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z3_USE_ENDSTOP == _E1DIAG_ - #warning "Note: Auto-assigned Z3_DIAG_PIN to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z3_USE_ENDSTOP == _E2DIAG_ - #warning "Note: Auto-assigned Z3_DIAG_PIN to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z3_USE_ENDSTOP == _E3DIAG_ - #warning "Note: Auto-assigned Z3_DIAG_PIN to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z3_USE_ENDSTOP == _E4DIAG_ - #warning "Note: Auto-assigned Z3_DIAG_PIN to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z3_USE_ENDSTOP == _E5DIAG_ - #warning "Note: Auto-assigned Z3_DIAG_PIN to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z3_USE_ENDSTOP == _E6DIAG_ - #warning "Note: Auto-assigned Z3_DIAG_PIN to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z3_USE_ENDSTOP == _E7DIAG_ - #warning "Note: Auto-assigned Z3_DIAG_PIN to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #if Z3_USE_ENDSTOP == X_MIN_PIN + #warning "Note: Auto-assigned Z3 sensorless endstop to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z3_STOP_PIN == X_MAX_PIN + #warning "Note: Auto-assigned Z3 sensorless endstop to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z3_STOP_PIN == X_STOP_PIN + #warning "Note: Auto-assigned Z3 sensorless endstop to X_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z3_USE_ENDSTOP == Y_MIN_PIN + #warning "Note: Auto-assigned Z3 sensorless endstop to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z3_STOP_PIN == Y_MAX_PIN + #warning "Note: Auto-assigned Z3 sensorless endstop to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z3_STOP_PIN == Y_STOP_PIN + #warning "Note: Auto-assigned Z3 sensorless endstop to Y_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z3_USE_ENDSTOP == Z_MIN_PIN + #warning "Note: Auto-assigned Z3 sensorless endstop to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z3_STOP_PIN == Z_MAX_PIN + #warning "Note: Auto-assigned Z3 sensorless endstop to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z3_STOP_PIN == Z_STOP_PIN + #warning "Note: Auto-assigned Z3 sensorless endstop to Z_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z3_STOP_PIN == E0_DIAG_PIN + #warning "Note: Auto-assigned Z3 sensorless endstop to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z3_STOP_PIN == E1_DIAG_PIN + #warning "Note: Auto-assigned Z3 sensorless endstop to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z3_STOP_PIN == E2_DIAG_PIN + #warning "Note: Auto-assigned Z3 sensorless endstop to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z3_STOP_PIN == E3_DIAG_PIN + #warning "Note: Auto-assigned Z3 sensorless endstop to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z3_STOP_PIN == E4_DIAG_PIN + #warning "Note: Auto-assigned Z3 sensorless endstop to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z3_STOP_PIN == E5_DIAG_PIN + #warning "Note: Auto-assigned Z3 sensorless endstop to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z3_STOP_PIN == E6_DIAG_PIN + #warning "Note: Auto-assigned Z3 sensorless endstop to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z3_STOP_PIN == E7_DIAG_PIN + #warning "Note: Auto-assigned Z3 sensorless endstop to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" #endif #endif #if AUTO_ASSIGNED_Z4_STEPPER @@ -327,46 +303,40 @@ #warning "Note: Auto-assigned Z4_MS3_PIN to an unused En_MS3_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" #endif #if AUTO_ASSIGNED_Z4_DIAG - #if Z4_USE_ENDSTOP == _XMIN_ - #warning "Note: Auto-assigned Z4_DIAG_PIN to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z4_USE_ENDSTOP == _XMAX_ - #warning "Note: Auto-assigned Z4_DIAG_PIN to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z4_USE_ENDSTOP == _XSTOP_ - #warning "Note: Auto-assigned Z4_DIAG_PIN to X_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z4_USE_ENDSTOP == _YMIN_ - #warning "Note: Auto-assigned Z4_DIAG_PIN to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z4_USE_ENDSTOP == _YMAX_ - #warning "Note: Auto-assigned Z4_DIAG_PIN to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z4_USE_ENDSTOP == _YSTOP_ - #warning "Note: Auto-assigned Z4_DIAG_PIN to Y_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z4_USE_ENDSTOP == _ZMIN_ - #warning "Note: Auto-assigned Z4_DIAG_PIN to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z4_USE_ENDSTOP == _ZMAX_ - #warning "Note: Auto-assigned Z4_DIAG_PIN to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z4_USE_ENDSTOP == _ZSTOP_ - #warning "Note: Auto-assigned Z4_DIAG_PIN to Z_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z4_USE_ENDSTOP == _XDIAG_ - #warning "Note: Auto-assigned Z4_DIAG_PIN to X_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z4_USE_ENDSTOP == _YDIAG_ - #warning "Note: Auto-assigned Z4_DIAG_PIN to Y_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z4_USE_ENDSTOP == _ZDIAG_ - #warning "Note: Auto-assigned Z4_DIAG_PIN to Z_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z4_USE_ENDSTOP == _E0DIAG_ - #warning "Note: Auto-assigned Z4_DIAG_PIN to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z4_USE_ENDSTOP == _E1DIAG_ - #warning "Note: Auto-assigned Z4_DIAG_PIN to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z4_USE_ENDSTOP == _E2DIAG_ - #warning "Note: Auto-assigned Z4_DIAG_PIN to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z4_USE_ENDSTOP == _E3DIAG_ - #warning "Note: Auto-assigned Z4_DIAG_PIN to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z4_USE_ENDSTOP == _E4DIAG_ - #warning "Note: Auto-assigned Z4_DIAG_PIN to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z4_USE_ENDSTOP == _E5DIAG_ - #warning "Note: Auto-assigned Z4_DIAG_PIN to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z4_USE_ENDSTOP == _E6DIAG_ - #warning "Note: Auto-assigned Z4_DIAG_PIN to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif Z4_USE_ENDSTOP == _E7DIAG_ - #warning "Note: Auto-assigned Z4_DIAG_PIN to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #if Z4_USE_ENDSTOP == X_MIN_PIN + #warning "Note: Auto-assigned Z4 sensorless endstop to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z4_STOP_PIN == X_MAX_PIN + #warning "Note: Auto-assigned Z4 sensorless endstop to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z4_STOP_PIN == X_STOP_PIN + #warning "Note: Auto-assigned Z4 sensorless endstop to X_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z4_USE_ENDSTOP == Y_MIN_PIN + #warning "Note: Auto-assigned Z4 sensorless endstop to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z4_STOP_PIN == Y_MAX_PIN + #warning "Note: Auto-assigned Z4 sensorless endstop to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z4_STOP_PIN == Y_STOP_PIN + #warning "Note: Auto-assigned Z4 sensorless endstop to Y_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z4_USE_ENDSTOP == Z_MIN_PIN + #warning "Note: Auto-assigned Z4 sensorless endstop to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z4_STOP_PIN == Z_MAX_PIN + #warning "Note: Auto-assigned Z4 sensorless endstop to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z4_STOP_PIN == Z_STOP_PIN + #warning "Note: Auto-assigned Z4 sensorless endstop to Z_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z4_STOP_PIN == E0_DIAG_PIN + #warning "Note: Auto-assigned Z4 sensorless endstop to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z4_STOP_PIN == E1_DIAG_PIN + #warning "Note: Auto-assigned Z4 sensorless endstop to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z4_STOP_PIN == E2_DIAG_PIN + #warning "Note: Auto-assigned Z4 sensorless endstop to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z4_STOP_PIN == E3_DIAG_PIN + #warning "Note: Auto-assigned Z4 sensorless endstop to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z4_STOP_PIN == E4_DIAG_PIN + #warning "Note: Auto-assigned Z4 sensorless endstop to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z4_STOP_PIN == E5_DIAG_PIN + #warning "Note: Auto-assigned Z4 sensorless endstop to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z4_STOP_PIN == E6_DIAG_PIN + #warning "Note: Auto-assigned Z4 sensorless endstop to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif Z4_STOP_PIN == E7_DIAG_PIN + #warning "Note: Auto-assigned Z4 sensorless endstop to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" #endif #endif #if AUTO_ASSIGNED_I_STEPPER @@ -385,46 +355,40 @@ #warning "Note: Auto-assigned I_MS3_PIN to an unused En_MS3_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" #endif #if AUTO_ASSIGNED_I_DIAG - #if I_USE_ENDSTOP == _XMIN_ - #warning "Note: Auto-assigned I_DIAG_PIN to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif I_USE_ENDSTOP == _XMAX_ - #warning "Note: Auto-assigned I_DIAG_PIN to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif I_USE_ENDSTOP == _XSTOP_ - #warning "Note: Auto-assigned I_DIAG_PIN to X_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif I_USE_ENDSTOP == _YMIN_ - #warning "Note: Auto-assigned I_DIAG_PIN to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif I_USE_ENDSTOP == _YMAX_ - #warning "Note: Auto-assigned I_DIAG_PIN to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif I_USE_ENDSTOP == _YSTOP_ - #warning "Note: Auto-assigned I_DIAG_PIN to Y_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif I_USE_ENDSTOP == _ZMIN_ - #warning "Note: Auto-assigned I_DIAG_PIN to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif I_USE_ENDSTOP == _ZMAX_ - #warning "Note: Auto-assigned I_DIAG_PIN to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif I_USE_ENDSTOP == _ZSTOP_ - #warning "Note: Auto-assigned I_DIAG_PIN to Z_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif I_USE_ENDSTOP == _XDIAG_ - #warning "Note: Auto-assigned I_DIAG_PIN to X_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif I_USE_ENDSTOP == _YDIAG_ - #warning "Note: Auto-assigned I_DIAG_PIN to Y_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif I_USE_ENDSTOP == _ZDIAG_ - #warning "Note: Auto-assigned I_DIAG_PIN to Z_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif I_USE_ENDSTOP == _E0DIAG_ - #warning "Note: Auto-assigned I_DIAG_PIN to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif I_USE_ENDSTOP == _E1DIAG_ - #warning "Note: Auto-assigned I_DIAG_PIN to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif I_USE_ENDSTOP == _E2DIAG_ - #warning "Note: Auto-assigned I_DIAG_PIN to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif I_USE_ENDSTOP == _E3DIAG_ - #warning "Note: Auto-assigned I_DIAG_PIN to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif I_USE_ENDSTOP == _E4DIAG_ - #warning "Note: Auto-assigned I_DIAG_PIN to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif I_USE_ENDSTOP == _E5DIAG_ - #warning "Note: Auto-assigned I_DIAG_PIN to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif I_USE_ENDSTOP == _E6DIAG_ - #warning "Note: Auto-assigned I_DIAG_PIN to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif I_USE_ENDSTOP == _E7DIAG_ - #warning "Note: Auto-assigned I_DIAG_PIN to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #if I_STOP_PIN == X_MIN_PIN + #warning "Note: Auto-assigned I sensorless endstop to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif I_STOP_PIN == X_MAX_PIN + #warning "Note: Auto-assigned I sensorless endstop to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif I_STOP_PIN == X_STOP_PIN + #warning "Note: Auto-assigned I sensorless endstop to X_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif I_STOP_PIN == Y_MIN_PIN + #warning "Note: Auto-assigned I sensorless endstop to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif I_STOP_PIN == Y_MAX_PIN + #warning "Note: Auto-assigned I sensorless endstop to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif I_STOP_PIN == Y_STOP_PIN + #warning "Note: Auto-assigned I sensorless endstop to Y_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif I_STOP_PIN == Z_MIN_PIN + #warning "Note: Auto-assigned I sensorless endstop to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif I_STOP_PIN == Z_MAX_PIN + #warning "Note: Auto-assigned I sensorless endstop to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif I_STOP_PIN == Z_STOP_PIN + #warning "Note: Auto-assigned I sensorless endstop to Z_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif I_STOP_PIN == E0_DIAG_PIN + #warning "Note: Auto-assigned I sensorless endstop to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif I_STOP_PIN == E1_DIAG_PIN + #warning "Note: Auto-assigned I sensorless endstop to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif I_STOP_PIN == E2_DIAG_PIN + #warning "Note: Auto-assigned I sensorless endstop to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif I_STOP_PIN == E3_DIAG_PIN + #warning "Note: Auto-assigned I sensorless endstop to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif I_STOP_PIN == E4_DIAG_PIN + #warning "Note: Auto-assigned I sensorless endstop to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif I_STOP_PIN == E5_DIAG_PIN + #warning "Note: Auto-assigned I sensorless endstop to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif I_STOP_PIN == E6_DIAG_PIN + #warning "Note: Auto-assigned I sensorless endstop to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif I_STOP_PIN == E7_DIAG_PIN + #warning "Note: Auto-assigned I sensorless endstop to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" #endif #endif #if AUTO_ASSIGNED_J_STEPPER @@ -443,46 +407,40 @@ #warning "Note: Auto-assigned J_MS3_PIN to an unused En_MS3_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" #endif #if AUTO_ASSIGNED_J_DIAG - #if J_USE_ENDSTOP == _XMIN_ - #warning "Note: Auto-assigned J_DIAG_PIN to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif J_USE_ENDSTOP == _XMAX_ - #warning "Note: Auto-assigned J_DIAG_PIN to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif J_USE_ENDSTOP == _XSTOP_ - #warning "Note: Auto-assigned J_DIAG_PIN to X_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif J_USE_ENDSTOP == _YMIN_ - #warning "Note: Auto-assigned J_DIAG_PIN to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif J_USE_ENDSTOP == _YMAX_ - #warning "Note: Auto-assigned J_DIAG_PIN to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif J_USE_ENDSTOP == _YSTOP_ - #warning "Note: Auto-assigned J_DIAG_PIN to Y_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif J_USE_ENDSTOP == _ZMIN_ - #warning "Note: Auto-assigned J_DIAG_PIN to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif J_USE_ENDSTOP == _ZMAX_ - #warning "Note: Auto-assigned J_DIAG_PIN to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif J_USE_ENDSTOP == _ZSTOP_ - #warning "Note: Auto-assigned J_DIAG_PIN to Z_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif J_USE_ENDSTOP == _XDIAG_ - #warning "Note: Auto-assigned J_DIAG_PIN to X_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif J_USE_ENDSTOP == _YDIAG_ - #warning "Note: Auto-assigned J_DIAG_PIN to Y_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif J_USE_ENDSTOP == _ZDIAG_ - #warning "Note: Auto-assigned J_DIAG_PIN to Z_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif J_USE_ENDSTOP == _E0DIAG_ - #warning "Note: Auto-assigned J_DIAG_PIN to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif J_USE_ENDSTOP == _E1DIAG_ - #warning "Note: Auto-assigned J_DIAG_PIN to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif J_USE_ENDSTOP == _E2DIAG_ - #warning "Note: Auto-assigned J_DIAG_PIN to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif J_USE_ENDSTOP == _E3DIAG_ - #warning "Note: Auto-assigned J_DIAG_PIN to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif J_USE_ENDSTOP == _E4DIAG_ - #warning "Note: Auto-assigned J_DIAG_PIN to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif J_USE_ENDSTOP == _E5DIAG_ - #warning "Note: Auto-assigned J_DIAG_PIN to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif J_USE_ENDSTOP == _E6DIAG_ - #warning "Note: Auto-assigned J_DIAG_PIN to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif J_USE_ENDSTOP == _E7DIAG_ - #warning "Note: Auto-assigned J_DIAG_PIN to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #if J_STOP_PIN == X_MIN_PIN + #warning "Note: Auto-assigned J sensorless endstop to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif J_STOP_PIN == X_MAX_PIN + #warning "Note: Auto-assigned J sensorless endstop to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif J_STOP_PIN == X_STOP_PIN + #warning "Note: Auto-assigned J sensorless endstop to X_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif J_STOP_PIN == Y_MIN_PIN + #warning "Note: Auto-assigned J sensorless endstop to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif J_STOP_PIN == Y_MAX_PIN + #warning "Note: Auto-assigned J sensorless endstop to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif J_STOP_PIN == Y_STOP_PIN + #warning "Note: Auto-assigned J sensorless endstop to Y_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif J_STOP_PIN == Z_MIN_PIN + #warning "Note: Auto-assigned J sensorless endstop to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif J_STOP_PIN == Z_MAX_PIN + #warning "Note: Auto-assigned J sensorless endstop to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif J_STOP_PIN == Z_STOP_PIN + #warning "Note: Auto-assigned J sensorless endstop to Z_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif J_STOP_PIN == E0_DIAG_PIN + #warning "Note: Auto-assigned J sensorless endstop to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif J_STOP_PIN == E1_DIAG_PIN + #warning "Note: Auto-assigned J sensorless endstop to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif J_STOP_PIN == E2_DIAG_PIN + #warning "Note: Auto-assigned J sensorless endstop to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif J_STOP_PIN == E3_DIAG_PIN + #warning "Note: Auto-assigned J sensorless endstop to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif J_STOP_PIN == E4_DIAG_PIN + #warning "Note: Auto-assigned J sensorless endstop to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif J_STOP_PIN == E5_DIAG_PIN + #warning "Note: Auto-assigned J sensorless endstop to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif J_STOP_PIN == E6_DIAG_PIN + #warning "Note: Auto-assigned J sensorless endstop to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif J_STOP_PIN == E7_DIAG_PIN + #warning "Note: Auto-assigned J sensorless endstop to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" #endif #endif #if AUTO_ASSIGNED_K_STEPPER @@ -501,46 +459,40 @@ #warning "Note: Auto-assigned K_MS3_PIN to an unused En_MS3_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" #endif #if AUTO_ASSIGNED_K_DIAG - #if K_USE_ENDSTOP == _XMIN_ - #warning "Note: Auto-assigned K_DIAG_PIN to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif K_USE_ENDSTOP == _XMAX_ - #warning "Note: Auto-assigned K_DIAG_PIN to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif K_USE_ENDSTOP == _XSTOP_ - #warning "Note: Auto-assigned K_DIAG_PIN to X_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif K_USE_ENDSTOP == _YMIN_ - #warning "Note: Auto-assigned K_DIAG_PIN to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif K_USE_ENDSTOP == _YMAX_ - #warning "Note: Auto-assigned K_DIAG_PIN to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif K_USE_ENDSTOP == _YSTOP_ - #warning "Note: Auto-assigned K_DIAG_PIN to Y_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif K_USE_ENDSTOP == _ZMIN_ - #warning "Note: Auto-assigned K_DIAG_PIN to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif K_USE_ENDSTOP == _ZMAX_ - #warning "Note: Auto-assigned K_DIAG_PIN to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif K_USE_ENDSTOP == _ZSTOP_ - #warning "Note: Auto-assigned K_DIAG_PIN to Z_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif K_USE_ENDSTOP == _XDIAG_ - #warning "Note: Auto-assigned K_DIAG_PIN to X_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif K_USE_ENDSTOP == _YDIAG_ - #warning "Note: Auto-assigned K_DIAG_PIN to Y_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif K_USE_ENDSTOP == _ZDIAG_ - #warning "Note: Auto-assigned K_DIAG_PIN to Z_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif K_USE_ENDSTOP == _E0DIAG_ - #warning "Note: Auto-assigned K_DIAG_PIN to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif K_USE_ENDSTOP == _E1DIAG_ - #warning "Note: Auto-assigned K_DIAG_PIN to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif K_USE_ENDSTOP == _E2DIAG_ - #warning "Note: Auto-assigned K_DIAG_PIN to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif K_USE_ENDSTOP == _E3DIAG_ - #warning "Note: Auto-assigned K_DIAG_PIN to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif K_USE_ENDSTOP == _E4DIAG_ - #warning "Note: Auto-assigned K_DIAG_PIN to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif K_USE_ENDSTOP == _E5DIAG_ - #warning "Note: Auto-assigned K_DIAG_PIN to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif K_USE_ENDSTOP == _E6DIAG_ - #warning "Note: Auto-assigned K_DIAG_PIN to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif K_USE_ENDSTOP == _E7DIAG_ - #warning "Note: Auto-assigned K_DIAG_PIN to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #if K_STOP_PIN == X_MIN_PIN + #warning "Note: Auto-assigned K sensorless endstop to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif K_STOP_PIN == X_MAX_PIN + #warning "Note: Auto-assigned K sensorless endstop to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif K_STOP_PIN == X_STOP_PIN + #warning "Note: Auto-assigned K sensorless endstop to X_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif K_STOP_PIN == Y_MIN_PIN + #warning "Note: Auto-assigned K sensorless endstop to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif K_STOP_PIN == Y_MAX_PIN + #warning "Note: Auto-assigned K sensorless endstop to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif K_STOP_PIN == Y_STOP_PIN + #warning "Note: Auto-assigned K sensorless endstop to Y_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif K_STOP_PIN == Z_MIN_PIN + #warning "Note: Auto-assigned K sensorless endstop to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif K_STOP_PIN == Z_MAX_PIN + #warning "Note: Auto-assigned K sensorless endstop to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif K_STOP_PIN == Z_STOP_PIN + #warning "Note: Auto-assigned K sensorless endstop to Z_STOP_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif K_STOP_PIN == E0_DIAG_PIN + #warning "Note: Auto-assigned K sensorless endstop to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif K_STOP_PIN == E1_DIAG_PIN + #warning "Note: Auto-assigned K sensorless endstop to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif K_STOP_PIN == E2_DIAG_PIN + #warning "Note: Auto-assigned K sensorless endstop to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif K_STOP_PIN == E3_DIAG_PIN + #warning "Note: Auto-assigned K sensorless endstop to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif K_STOP_PIN == E4_DIAG_PIN + #warning "Note: Auto-assigned K sensorless endstop to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif K_STOP_PIN == E5_DIAG_PIN + #warning "Note: Auto-assigned K sensorless endstop to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif K_STOP_PIN == E6_DIAG_PIN + #warning "Note: Auto-assigned K sensorless endstop to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif K_STOP_PIN == E7_DIAG_PIN + #warning "Note: Auto-assigned K sensorless endstop to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" #endif #endif @@ -560,40 +512,34 @@ #warning "Note: Auto-assigned U_MS3_PIN to an unused En_MS3_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" #endif #if AUTO_ASSIGNED_U_DIAG - #if U_USE_ENDSTOP == _XMIN_ - #warning "Note: Auto-assigned U_DIAG_PIN to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif U_USE_ENDSTOP == _XMAX_ - #warning "Note: Auto-assigned U_DIAG_PIN to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif K_USE_ENDSTOP == _YMIN_ - #warning "Note: Auto-assigned U_DIAG_PIN to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif U_USE_ENDSTOP == _YMAX_ - #warning "Note: Auto-assigned U_DIAG_PIN to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif U_USE_ENDSTOP == _ZMIN_ - #warning "Note: Auto-assigned U_DIAG_PIN to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif U_USE_ENDSTOP == _ZMAX_ - #warning "Note: Auto-assigned U_DIAG_PIN to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif U_USE_ENDSTOP == _XDIAG_ - #warning "Note: Auto-assigned U_DIAG_PIN to X_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif U_USE_ENDSTOP == _YDIAG_ - #warning "Note: Auto-assigned U_DIAG_PIN to Y_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif U_USE_ENDSTOP == _ZDIAG_ - #warning "Note: Auto-assigned U_DIAG_PIN to Z_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif U_USE_ENDSTOP == _E0DIAG_ - #warning "Note: Auto-assigned U_DIAG_PIN to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif U_USE_ENDSTOP == _E1DIAG_ - #warning "Note: Auto-assigned U_DIAG_PIN to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif U_USE_ENDSTOP == _E2DIAG_ - #warning "Note: Auto-assigned U_DIAG_PIN to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif U_USE_ENDSTOP == _E3DIAG_ - #warning "Note: Auto-assigned U_DIAG_PIN to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif U_USE_ENDSTOP == _E4DIAG_ - #warning "Note: Auto-assigned U_DIAG_PIN to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif U_USE_ENDSTOP == _E5DIAG_ - #warning "Note: Auto-assigned U_DIAG_PIN to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif U_USE_ENDSTOP == _E6DIAG_ - #warning "Note: Auto-assigned U_DIAG_PIN to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif U_USE_ENDSTOP == _E7DIAG_ - #warning "Note: Auto-assigned U_DIAG_PIN to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #if U_STOP_PIN == X_MIN_PIN + #warning "Note: Auto-assigned U sensorless endstop to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif U_STOP_PIN == X_MAX_PIN + #warning "Note: Auto-assigned U sensorless endstop to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif K_STOP_PIN == Y_MIN_PIN + #warning "Note: Auto-assigned U sensorless endstop to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif U_STOP_PIN == Y_MAX_PIN + #warning "Note: Auto-assigned U sensorless endstop to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif U_STOP_PIN == Z_MIN_PIN + #warning "Note: Auto-assigned U sensorless endstop to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif U_STOP_PIN == Z_MAX_PIN + #warning "Note: Auto-assigned U sensorless endstop to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif U_STOP_PIN == E0_DIAG_PIN + #warning "Note: Auto-assigned U sensorless endstop to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif U_STOP_PIN == E1_DIAG_PIN + #warning "Note: Auto-assigned U sensorless endstop to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif U_STOP_PIN == E2_DIAG_PIN + #warning "Note: Auto-assigned U sensorless endstop to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif U_STOP_PIN == E3_DIAG_PIN + #warning "Note: Auto-assigned U sensorless endstop to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif U_STOP_PIN == E4_DIAG_PIN + #warning "Note: Auto-assigned U sensorless endstop to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif U_STOP_PIN == E5_DIAG_PIN + #warning "Note: Auto-assigned U sensorless endstop to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif U_STOP_PIN == E6_DIAG_PIN + #warning "Note: Auto-assigned U sensorless endstop to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif U_STOP_PIN == E7_DIAG_PIN + #warning "Note: Auto-assigned U sensorless endstop to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" #endif #endif #if AUTO_ASSIGNED_V_STEPPER @@ -612,40 +558,34 @@ #warning "Note: Auto-assigned V_MS3_PIN to an unused En_MS3_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" #endif #if AUTO_ASSIGNED_V_DIAG - #if V_USE_ENDSTOP == _XMIN_ - #warning "Note: Auto-assigned V_DIAG_PIN to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif V_USE_ENDSTOP == _XMAX_ - #warning "Note: Auto-assigned V_DIAG_PIN to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif V_USE_ENDSTOP == _YMIN_ - #warning "Note: Auto-assigned V_DIAG_PIN to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif V_USE_ENDSTOP == _YMAX_ - #warning "Note: Auto-assigned V_DIAG_PIN to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif V_USE_ENDSTOP == _ZMIN_ - #warning "Note: Auto-assigned V_DIAG_PIN to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif V_USE_ENDSTOP == _ZMAX_ - #warning "Note: Auto-assigned V_DIAG_PIN to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif V_USE_ENDSTOP == _XDIAG_ - #warning "Note: Auto-assigned V_DIAG_PIN to X_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif V_USE_ENDSTOP == _YDIAG_ - #warning "Note: Auto-assigned V_DIAG_PIN to Y_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif V_USE_ENDSTOP == _ZDIAG_ - #warning "Note: Auto-assigned V_DIAG_PIN to Z_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif V_USE_ENDSTOP == _E0DIAG_ - #warning "Note: Auto-assigned V_DIAG_PIN to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif V_USE_ENDSTOP == _E1DIAG_ - #warning "Note: Auto-assigned V_DIAG_PIN to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif V_USE_ENDSTOP == _E2DIAG_ - #warning "Note: Auto-assigned V_DIAG_PIN to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif V_USE_ENDSTOP == _E3DIAG_ - #warning "Note: Auto-assigned V_DIAG_PIN to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif V_USE_ENDSTOP == _E4DIAG_ - #warning "Note: Auto-assigned V_DIAG_PIN to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif V_USE_ENDSTOP == _E5DIAG_ - #warning "Note: Auto-assigned V_DIAG_PIN to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif V_USE_ENDSTOP == _E6DIAG_ - #warning "Note: Auto-assigned V_DIAG_PIN to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif V_USE_ENDSTOP == _E7DIAG_ - #warning "Note: Auto-assigned V_DIAG_PIN to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #if V_STOP_PIN == X_MIN_PIN + #warning "Note: Auto-assigned V sensorless endstop to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif V_STOP_PIN == X_MAX_PIN + #warning "Note: Auto-assigned V sensorless endstop to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif V_STOP_PIN == Y_MIN_PIN + #warning "Note: Auto-assigned V sensorless endstop to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif V_STOP_PIN == Y_MAX_PIN + #warning "Note: Auto-assigned V sensorless endstop to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif V_STOP_PIN == Z_MIN_PIN + #warning "Note: Auto-assigned V sensorless endstop to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif V_STOP_PIN == Z_MAX_PIN + #warning "Note: Auto-assigned V sensorless endstop to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif V_STOP_PIN == E0_DIAG_PIN + #warning "Note: Auto-assigned V sensorless endstop to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif V_STOP_PIN == E1_DIAG_PIN + #warning "Note: Auto-assigned V sensorless endstop to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif V_STOP_PIN == E2_DIAG_PIN + #warning "Note: Auto-assigned V sensorless endstop to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif V_STOP_PIN == E3_DIAG_PIN + #warning "Note: Auto-assigned V sensorless endstop to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif V_STOP_PIN == E4_DIAG_PIN + #warning "Note: Auto-assigned V sensorless endstop to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif V_STOP_PIN == E5_DIAG_PIN + #warning "Note: Auto-assigned V sensorless endstop to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif V_STOP_PIN == E6_DIAG_PIN + #warning "Note: Auto-assigned V sensorless endstop to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif V_STOP_PIN == E7_DIAG_PIN + #warning "Note: Auto-assigned V sensorless endstop to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" #endif #endif #if AUTO_ASSIGNED_W_STEPPER @@ -664,40 +604,34 @@ #warning "Note: Auto-assigned W_MS3_PIN to an unused En_MS3_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" #endif #if AUTO_ASSIGNED_W_DIAG - #if W_USE_ENDSTOP == _XMIN_ - #warning "Note: Auto-assigned W_DIAG_PIN to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif W_USE_ENDSTOP == _XMAX_ - #warning "Note: Auto-assigned W_DIAG_PIN to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif W_USE_ENDSTOP == _YMIN_ - #warning "Note: Auto-assigned W_DIAG_PIN to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif W_USE_ENDSTOP == _YMAX_ - #warning "Note: Auto-assigned W_DIAG_PIN to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif W_USE_ENDSTOP == _ZMIN_ - #warning "Note: Auto-assigned W_DIAG_PIN to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif W_USE_ENDSTOP == _ZMAX_ - #warning "Note: Auto-assigned W_DIAG_PIN to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif W_USE_ENDSTOP == _XDIAG_ - #warning "Note: Auto-assigned W_DIAG_PIN to X_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif W_USE_ENDSTOP == _YDIAG_ - #warning "Note: Auto-assigned W_DIAG_PIN to Y_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif W_USE_ENDSTOP == _ZDIAG_ - #warning "Note: Auto-assigned W_DIAG_PIN to Z_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif W_USE_ENDSTOP == _E0DIAG_ - #warning "Note: Auto-assigned W_DIAG_PIN to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif W_USE_ENDSTOP == _E1DIAG_ - #warning "Note: Auto-assigned W_DIAG_PIN to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif W_USE_ENDSTOP == _E2DIAG_ - #warning "Note: Auto-assigned W_DIAG_PIN to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif W_USE_ENDSTOP == _E3DIAG_ - #warning "Note: Auto-assigned W_DIAG_PIN to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif W_USE_ENDSTOP == _E4DIAG_ - #warning "Note: Auto-assigned W_DIAG_PIN to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif W_USE_ENDSTOP == _E5DIAG_ - #warning "Note: Auto-assigned W_DIAG_PIN to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif W_USE_ENDSTOP == _E6DIAG_ - #warning "Note: Auto-assigned W_DIAG_PIN to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" - #elif W_USE_ENDSTOP == _E7DIAG_ - #warning "Note: Auto-assigned W_DIAG_PIN to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #if W_STOP_PIN == X_MIN_PIN + #warning "Note: Auto-assigned W sensorless endstop to X_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif W_STOP_PIN == X_MAX_PIN + #warning "Note: Auto-assigned W sensorless endstop to X_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif W_STOP_PIN == Y_MIN_PIN + #warning "Note: Auto-assigned W sensorless endstop to Y_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif W_STOP_PIN == Y_MAX_PIN + #warning "Note: Auto-assigned W sensorless endstop to Y_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif W_STOP_PIN == Z_MIN_PIN + #warning "Note: Auto-assigned W sensorless endstop to Z_MIN_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif W_STOP_PIN == Z_MAX_PIN + #warning "Note: Auto-assigned W sensorless endstop to Z_MAX_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif W_STOP_PIN == E0_DIAG_PIN + #warning "Note: Auto-assigned W sensorless endstop to E0_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif W_STOP_PIN == E1_DIAG_PIN + #warning "Note: Auto-assigned W sensorless endstop to E1_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif W_STOP_PIN == E2_DIAG_PIN + #warning "Note: Auto-assigned W sensorless endstop to E2_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif W_STOP_PIN == E3_DIAG_PIN + #warning "Note: Auto-assigned W sensorless endstop to E3_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif W_STOP_PIN == E4_DIAG_PIN + #warning "Note: Auto-assigned W sensorless endstop to E4_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif W_STOP_PIN == E5_DIAG_PIN + #warning "Note: Auto-assigned W sensorless endstop to E5_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif W_STOP_PIN == E6_DIAG_PIN + #warning "Note: Auto-assigned W sensorless endstop to E6_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" + #elif W_STOP_PIN == E7_DIAG_PIN + #warning "Note: Auto-assigned W sensorless endstop to E7_DIAG_PIN. (Define NO_AUTO_ASSIGN_WARNING to suppress this warning.)" #endif #endif diff --git a/Marlin/src/lcd/e3v2/proui/endstop_diag.cpp b/Marlin/src/lcd/e3v2/proui/endstop_diag.cpp index 96ee732678..055f26c058 100644 --- a/Marlin/src/lcd/e3v2/proui/endstop_diag.cpp +++ b/Marlin/src/lcd/e3v2/proui/endstop_diag.cpp @@ -72,9 +72,9 @@ void ESDiagClass::Draw() { DWINUI::Draw_Button(BTN_Continue, 86, 250); DWINUI::cursor.y = 80; #define ES_LABEL(S) draw_es_label(F(STR_##S)) - TERN_(HAS_X_MIN, ES_LABEL(X_MIN)); TERN_(HAS_X_MAX, ES_LABEL(X_MAX)); - TERN_(HAS_Y_MIN, ES_LABEL(Y_MIN)); TERN_(HAS_Y_MAX, ES_LABEL(Y_MAX)); - TERN_(HAS_Z_MIN, ES_LABEL(Z_MIN)); TERN_(HAS_Z_MAX, ES_LABEL(Z_MAX)); + TERN_(HAS_X_MIN, ES_LABEL(X_MIN)); TERN_(HAS_X_MAX, ES_LABEL(X_MAX)); + TERN_(HAS_Y_MIN, ES_LABEL(Y_MIN)); TERN_(HAS_Y_MAX, ES_LABEL(Y_MAX)); + TERN_(HAS_Z_MIN_PIN, ES_LABEL(Z_MIN)); TERN_(HAS_Z_MAX, ES_LABEL(Z_MAX)); TERN_(HAS_FILAMENT_SENSOR, draw_es_label(F(STR_FILAMENT))); Update(); } @@ -82,9 +82,9 @@ void ESDiagClass::Draw() { void ESDiagClass::Update() { DWINUI::cursor.y = 80; #define ES_REPORT(S) draw_es_state(READ(S##_PIN) == S##_ENDSTOP_HIT_STATE) - TERN_(HAS_X_MIN, ES_REPORT(X_MIN)); TERN_(HAS_X_MAX, ES_REPORT(X_MAX)); - TERN_(HAS_Y_MIN, ES_REPORT(Y_MIN)); TERN_(HAS_Y_MAX, ES_REPORT(Y_MAX)); - TERN_(HAS_Z_MIN, ES_REPORT(Z_MIN)); TERN_(HAS_Z_MAX, ES_REPORT(Z_MAX)); + TERN_(HAS_X_MIN, ES_REPORT(X_MIN)); TERN_(HAS_X_MAX, ES_REPORT(X_MAX)); + TERN_(HAS_Y_MIN, ES_REPORT(Y_MIN)); TERN_(HAS_Y_MAX, ES_REPORT(Y_MAX)); + TERN_(HAS_Z_MIN_PIN, ES_REPORT(Z_MIN)); TERN_(HAS_Z_MAX, ES_REPORT(Z_MAX)); TERN_(HAS_FILAMENT_SENSOR, draw_es_state(READ(FIL_RUNOUT1_PIN) != FIL_RUNOUT1_STATE)); DWIN_UpdateLCD(); } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp index b52904fe8f..46d4998591 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp @@ -79,7 +79,7 @@ void EndstopStatesScreen::onRedraw(draw_mode_t) { #else PIN_DISABLED(3, 3, PSTR(STR_Y_MIN), Y_MIN) #endif - #if HAS_Z_MIN + #if HAS_Z_MIN_PIN PIN_ENABLED (5, 3, PSTR(STR_Z_MIN), Z_MIN, Z_MIN_ENDSTOP_HIT_STATE) #else PIN_DISABLED(5, 3, PSTR(STR_Z_MIN), Z_MIN) diff --git a/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp b/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp index 45a54f6177..20f069aa49 100644 --- a/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp +++ b/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp @@ -87,12 +87,12 @@ #if PIN_EXISTS(MT_DET_2) mt_det2_sta = (READ(MT_DET_2_PIN) == LOW); #endif - TERN_(HAS_X_ENDSTOP, endstopx1_sta = ESTATE(TERN(HAS_X_MIN, X_MIN, X_MAX))); - TERN_(HAS_X2_ENDSTOP, endstopx2_sta = ESTATE(TERN(HAS_X2_MIN, X2_MIN, X2_MAX))); - TERN_(HAS_Y_ENDSTOP, endstopy1_sta = ESTATE(TERN(HAS_Y_MIN, Y_MIN, Y_MAX))); - TERN_(HAS_Y2_ENDSTOP, endstopy2_sta = ESTATE(TERN(HAS_Y2_MIN, Y2_MIN, Y2_MAX))); - TERN_(HAS_Z_ENDSTOP, endstopz1_sta = ESTATE(TERN(HAS_Z_MIN, Z_MIN, Z_MAX))); - TERN_(HAS_Z2_ENDSTOP, endstopz2_sta = ESTATE(TERN(HAS_Z2_MIN, Z2_MIN, Z2_MAX))); + TERN_(HAS_X_ENDSTOP, endstopx1_sta = ESTATE(TERN(HAS_X_MIN, X_MIN, X_MAX))); + TERN_(HAS_X2_ENDSTOP, endstopx2_sta = ESTATE(TERN(HAS_X2_MIN, X2_MIN, X2_MAX))); + TERN_(HAS_Y_ENDSTOP, endstopy1_sta = ESTATE(TERN(HAS_Y_MIN, Y_MIN, Y_MAX))); + TERN_(HAS_Y2_ENDSTOP, endstopy2_sta = ESTATE(TERN(HAS_Y2_MIN, Y2_MIN, Y2_MAX))); + TERN_(HAS_Z_ENDSTOP, endstopz1_sta = ESTATE(TERN(HAS_Z_MIN_PIN, Z_MIN, Z_MAX))); + TERN_(HAS_Z2_ENDSTOP, endstopz2_sta = ESTATE(TERN(HAS_Z2_MIN, Z2_MIN, Z2_MAX))); } void test_gpio_readlevel_H() { @@ -104,12 +104,12 @@ #if PIN_EXISTS(MT_DET_2) mt_det2_sta = (READ(MT_DET_2_PIN) == HIGH); #endif - TERN_(HAS_X_ENDSTOP, endstopx1_sta = !ESTATE(TERN(HAS_X_MIN, X_MIN, X_MAX))); - TERN_(HAS_X2_ENDSTOP, endstopx2_sta = !ESTATE(TERN(HAS_X2_MIN, X2_MIN, X2_MAX))); - TERN_(HAS_Y_ENDSTOP, endstopy1_sta = !ESTATE(TERN(HAS_Y_MIN, Y_MIN, Y_MAX))); - TERN_(HAS_Y2_ENDSTOP, endstopy2_sta = !ESTATE(TERN(HAS_Y2_MIN, Y2_MIN, Y2_MAX))); - TERN_(HAS_Z_ENDSTOP, endstopz1_sta = !ESTATE(TERN(HAS_Z_MIN, Z_MIN, Z_MAX))); - TERN_(HAS_Z2_ENDSTOP, endstopz2_sta = !ESTATE(TERN(HAS_Z2_MIN, Z2_MIN, Z2_MAX))); + TERN_(HAS_X_ENDSTOP, endstopx1_sta = !ESTATE(TERN(HAS_X_MIN, X_MIN, X_MAX))); + TERN_(HAS_X2_ENDSTOP, endstopx2_sta = !ESTATE(TERN(HAS_X2_MIN, X2_MIN, X2_MAX))); + TERN_(HAS_Y_ENDSTOP, endstopy1_sta = !ESTATE(TERN(HAS_Y_MIN, Y_MIN, Y_MAX))); + TERN_(HAS_Y2_ENDSTOP, endstopy2_sta = !ESTATE(TERN(HAS_Y2_MIN, Y2_MIN, Y2_MAX))); + TERN_(HAS_Z_ENDSTOP, endstopz1_sta = !ESTATE(TERN(HAS_Z_MIN_PIN, Z_MIN, Z_MAX))); + TERN_(HAS_Z2_ENDSTOP, endstopz2_sta = !ESTATE(TERN(HAS_Z2_MIN, Z2_MIN, Z2_MAX))); } #include "../../../libs/buzzer.h" diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index 233d848425..ca231f1cb2 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -134,7 +134,7 @@ void Endstops::init() { #if HAS_Y2_MAX _INIT_ENDSTOP(MAX,Y,2); #endif - #if HAS_Z_MIN + #if HAS_Z_MIN_PIN _INIT_ENDSTOP(MIN,Z,); #endif #if HAS_Z_MAX @@ -598,7 +598,9 @@ void Endstops::update() { #endif #if HAS_Z_MIN && NONE(Z_SPI_SENSORLESS, Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) - UPDATE_LIVE_STATE(Z, MIN); + #if HAS_Z_MIN_PIN + UPDATE_LIVE_STATE(Z, MIN); + #endif #if ENABLED(Z_MULTI_ENDSTOPS) #if HAS_Z2_MIN UPDATE_LIVE_STATE(Z2, MIN); @@ -1179,7 +1181,7 @@ void Endstops::update() { #if HAS_Y_MAX ES_GET_STATE(Y_MAX); #endif - #if HAS_Z_MIN + #if HAS_Z_MIN_PIN ES_GET_STATE(Z_MIN); #endif #if HAS_Z_MAX diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 86a36c7580..67ee0bd08d 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -65,6 +65,57 @@ #define HAS_FREE_AUX2_PINS 1 #endif +// +// Check for additional used endstop pins +// +#ifndef X_MIN_PIN + #define X_MIN_PIN 1001 +#endif +#ifndef Y_MIN_PIN + #define Y_MIN_PIN 1002 +#endif +#ifndef Z_MIN_PIN + #define Z_MIN_PIN 1003 +#endif +#ifndef X_MAX_PIN + #define X_MAX_PIN 1004 +#endif +#ifndef Y_MAX_PIN + #define Y_MAX_PIN 1005 +#endif +#ifndef Z_MAX_PIN + #define Z_MAX_PIN 1006 +#endif +#define _ENDSTOP_IS_ANY(P) (HAS_EXTRA_ENDSTOPS && (X2_STOP_PIN == P || Y2_STOP_PIN == P || Z2_STOP_PIN == P || Z3_STOP_PIN == P || Z4_STOP_PIN == P)) +#if ENABLED(DUAL_X_CARRIAGE) || _ENDSTOP_IS_ANY(X_MIN_PIN) || _ENDSTOP_IS_ANY(X_MAX_PIN) + #define NEEDS_X_MINMAX 1 +#endif +#if _ENDSTOP_IS_ANY(Y_MIN_PIN) || _ENDSTOP_IS_ANY(Y_MAX_PIN) + #define NEEDS_Y_MINMAX 1 +#endif +#if _ENDSTOP_IS_ANY(Z_MIN_PIN) || _ENDSTOP_IS_ANY(Z_MAX_PIN) || BOTH(Z_HOME_TO_MAX, Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) + #define NEEDS_Z_MINMAX 1 +#endif +#undef _ENDSTOP_IS_ANY +#if X_MIN_PIN > 1000 + #undef X_MIN_PIN +#endif +#if Y_MIN_PIN > 1000 + #undef Y_MIN_PIN +#endif +#if Z_MIN_PIN > 1000 + #undef Z_MIN_PIN +#endif +#if X_MAX_PIN > 1000 + #undef X_MAX_PIN +#endif +#if Y_MAX_PIN > 1000 + #undef Y_MAX_PIN +#endif +#if Z_MAX_PIN > 1000 + #undef Z_MAX_PIN +#endif + // Test the target within the included pins file #ifdef __MARLIN_DEPS__ #define NOT_TARGET(V...) 0 diff --git a/Marlin/src/pins/pins_postprocess.h b/Marlin/src/pins/pins_postprocess.h index 9d917cec29..daf6c03aa3 100644 --- a/Marlin/src/pins/pins_postprocess.h +++ b/Marlin/src/pins/pins_postprocess.h @@ -511,8 +511,8 @@ #else #define X_STOP_PIN X_MAX_PIN #endif - #if !defined(X2_USE_ENDSTOP) && ENABLED(X_DUAL_ENDSTOPS) && PIN_EXISTS(X_STOP) - #define X2_USE_ENDSTOP _XSTOP_ + #if !defined(X2_STOP_PIN) && ENABLED(X_DUAL_ENDSTOPS) && PIN_EXISTS(X_STOP) + #define X2_STOP_PIN X_STOP_PIN #endif #endif @@ -528,8 +528,8 @@ #else #define Y_STOP_PIN Y_MAX_PIN #endif - #if !defined(Y2_USE_ENDSTOP) && ENABLED(Y_DUAL_ENDSTOPS) && PIN_EXISTS(Y_STOP) - #define Y2_USE_ENDSTOP _YSTOP_ + #if !defined(Y2_STOP_PIN) && ENABLED(Y_DUAL_ENDSTOPS) && PIN_EXISTS(Y_STOP) + #define Y2_STOP_PIN Y_STOP_PIN #endif #endif @@ -546,14 +546,14 @@ #define Z_STOP_PIN Z_MAX_PIN #endif #if ENABLED(Z_MULTI_ENDSTOPS) && PIN_EXISTS(Z_STOP) - #ifndef Z2_USE_ENDSTOP - #define Z2_USE_ENDSTOP _ZSTOP_ + #ifndef Z2_STOP_PIN + #define Z2_STOP_PIN Z_STOP_PIN #endif - #if NUM_Z_STEPPERS >= 3 && !defined(Z3_USE_ENDSTOP) - #define Z3_USE_ENDSTOP _ZSTOP_ + #if NUM_Z_STEPPERS >= 3 && !defined(Z3_STOP_PIN) + #define Z3_STOP_PIN Z_STOP_PIN #endif - #if NUM_Z_STEPPERS >= 4 && !defined(Z4_USE_ENDSTOP) - #define Z4_USE_ENDSTOP _ZSTOP_ + #if NUM_Z_STEPPERS >= 4 && !defined(Z4_STOP_PIN) + #define Z4_STOP_PIN Z_STOP_PIN #endif #endif #endif @@ -672,6 +672,10 @@ #endif #endif +// Utility macros to define extra axis pins in terms of E pins +#define __EPIN(p,q) E##p##_##q##_PIN +#define _EPIN(p,q) __EPIN(p,q) + /** * Auto-Assignment for Dual X, Dual Y, Multi-Z Steppers * @@ -680,12 +684,16 @@ * overridden in Configuration.h or Configuration_adv.h. */ -#define __PEXI(p,q) PIN_EXISTS(E##p##_##q) -#define _PEXI(p,q) __PEXI(p,q) -#define __EPIN(p,q) E##p##_##q##_PIN -#define _EPIN(p,q) __EPIN(p,q) +#define _E_DIAG_EXISTS(p) PIN_EXISTS(E##p##_DIAG) +#define E_DIAG_EXISTS(p) _E_DIAG_EXISTS(p) + +/** + * For endstop auto-assignment some pins files pre-assign MIN/MAX endstops + * to DIAG pins so those should be preferred over just using En_DIAG_PIN. + * DIAG_REMAPPED(X2, X_MIN) ... PIN_EXISTS(X_MIN) && E(X2_E_INDEX)_DIAG_PIN == X_MIN_PIN + */ #define DIAG_REMAPPED(p,q) (PIN_EXISTS(q) && _EPIN(p##_E_INDEX, DIAG) == q##_PIN) -#define _En_DIAG_(p) _E##p##_DIAG_ +#define _En_DIAG_PIN(p) E##p##_DIAG_PIN // The E0/E1 steppers are always used for Dual E #if ENABLED(E_DUAL_STEPPER_DRIVERS) @@ -697,7 +705,8 @@ #define X2_E_INDEX E_STEPPERS #endif -#if HAS_X2_STEPPER && !defined(X2_DIAG_PIN) && !defined(X2_STEP_PIN) && !PIN_EXISTS(X2_CS_PIN) +// X2 auto-assignment will use up an E stepper, but not if it's chained +#if HAS_X2_STEPPER && !defined(X2_STEP_PIN) && !PIN_EXISTS(X2_CS_PIN) #define Y2_E_INDEX INCREMENT(X2_E_INDEX) #else #define Y2_E_INDEX X2_E_INDEX @@ -751,21 +760,21 @@ // // Auto-assign pins for stallGuard sensorless homing // - #if !defined(X2_DIAG_PIN) && !defined(X2_USE_ENDSTOP) && defined(X2_STALL_SENSITIVITY) && ENABLED(X_DUAL_ENDSTOPS) && _PEXI(X2_E_INDEX, DIAG) + #if !defined(X2_STOP_PIN) && defined(X2_STALL_SENSITIVITY) && ENABLED(X_DUAL_ENDSTOPS) && E_DIAG_EXISTS(X2_E_INDEX) #if DIAG_REMAPPED(X2, X_MIN) // If already remapped in the pins file... - #define X2_USE_ENDSTOP _XMIN_ + #define X2_STOP_PIN X_MIN_PIN #elif DIAG_REMAPPED(X2, Y_MIN) - #define X2_USE_ENDSTOP _YMIN_ + #define X2_STOP_PIN Y_MIN_PIN #elif DIAG_REMAPPED(X2, Z_MIN) - #define X2_USE_ENDSTOP _ZMIN_ + #define X2_STOP_PIN Z_MIN_PIN #elif DIAG_REMAPPED(X2, X_MAX) - #define X2_USE_ENDSTOP _XMAX_ + #define X2_STOP_PIN X_MAX_PIN #elif DIAG_REMAPPED(X2, Y_MAX) - #define X2_USE_ENDSTOP _YMAX_ + #define X2_STOP_PIN Y_MAX_PIN #elif DIAG_REMAPPED(X2, Z_MAX) - #define X2_USE_ENDSTOP _ZMAX_ + #define X2_STOP_PIN Z_MAX_PIN #else // Otherwise pick the next free En_DIAG_PIN directly - #define X2_USE_ENDSTOP _En_DIAG_(X2_E_INDEX) + #define X2_STOP_PIN _En_DIAG_PIN(X2_E_INDEX) #endif #define AUTO_ASSIGNED_X2_DIAG 1 #endif @@ -784,7 +793,8 @@ #define X2_MS3_PIN -1 #endif -#if HAS_DUAL_Y_STEPPERS && !defined(Y2_DIAG_PIN) && !defined(Y2_STEP_PIN) && !PIN_EXISTS(Y2_CS_PIN) +// Y2 auto-assignment will use up an E stepper, but not if it's chained +#if HAS_DUAL_Y_STEPPERS && !defined(Y2_STEP_PIN) && !PIN_EXISTS(Y2_CS_PIN) #define Z2_E_INDEX INCREMENT(Y2_E_INDEX) #else #define Z2_E_INDEX Y2_E_INDEX @@ -835,21 +845,21 @@ #endif #endif // Auto-assign pins for stallGuard sensorless homing - #if !defined(Y2_DIAG_PIN) && !defined(Y2_USE_ENDSTOP) && defined(Y2_STALL_SENSITIVITY) && ENABLED(Y_DUAL_ENDSTOPS) && _PEXI(Y2_E_INDEX, DIAG) + #if !defined(Y2_STOP_PIN) && defined(Y2_STALL_SENSITIVITY) && ENABLED(Y_DUAL_ENDSTOPS) && E_DIAG_EXISTS(Y2_E_INDEX) #if DIAG_REMAPPED(Y2, X_MIN) - #define Y2_USE_ENDSTOP _XMIN_ + #define Y2_STOP_PIN X_MIN_PIN #elif DIAG_REMAPPED(Y2, Y_MIN) - #define Y2_USE_ENDSTOP _YMIN_ + #define Y2_STOP_PIN Y_MIN_PIN #elif DIAG_REMAPPED(Y2, Z_MIN) - #define Y2_USE_ENDSTOP _ZMIN_ + #define Y2_STOP_PIN Z_MIN_PIN #elif DIAG_REMAPPED(Y2, X_MAX) - #define Y2_USE_ENDSTOP _XMAX_ + #define Y2_STOP_PIN X_MAX_PIN #elif DIAG_REMAPPED(Y2, Y_MAX) - #define Y2_USE_ENDSTOP _YMAX_ + #define Y2_STOP_PIN Y_MAX_PIN #elif DIAG_REMAPPED(Y2, Z_MAX) - #define Y2_USE_ENDSTOP _ZMAX_ + #define Y2_STOP_PIN Z_MAX_PIN #else - #define Y2_USE_ENDSTOP _En_DIAG_(Y2_E_INDEX) + #define Y2_STOP_PIN _En_DIAG_PIN(Y2_E_INDEX) #endif #define AUTO_ASSIGNED_Y2_DIAG 1 #endif @@ -868,7 +878,8 @@ #define Y2_MS3_PIN -1 #endif -#if NUM_Z_STEPPERS >= 2 && !defined(Z2_DIAG_PIN) && !defined(Z2_STEP_PIN) && !PIN_EXISTS(Z2_CS_PIN) +// Z2 auto-assignment will use up an E stepper, but not if it's chained +#if NUM_Z_STEPPERS >= 2 && !defined(Z2_STEP_PIN) && !PIN_EXISTS(Z2_CS_PIN) #define Z3_E_INDEX INCREMENT(Z2_E_INDEX) #else #define Z3_E_INDEX Z2_E_INDEX @@ -919,21 +930,21 @@ #endif #endif // Auto-assign pins for stallGuard sensorless homing - #if !defined(Z2_DIAG_PIN) && !defined(Z2_USE_ENDSTOP) && defined(Z2_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && _PEXI(Z2_E_INDEX, DIAG) + #if !defined(Z2_STOP_PIN) && defined(Z2_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && E_DIAG_EXISTS(Z2_E_INDEX) #if DIAG_REMAPPED(Z2, X_MIN) - #define Z2_USE_ENDSTOP _XMIN_ + #define Z2_STOP_PIN X_MIN_PIN #elif DIAG_REMAPPED(Z2, Y_MIN) - #define Z2_USE_ENDSTOP _YMIN_ + #define Z2_STOP_PIN Y_MIN_PIN #elif DIAG_REMAPPED(Z2, Z_MIN) - #define Z2_USE_ENDSTOP _ZMIN_ + #define Z2_STOP_PIN Z_MIN_PIN #elif DIAG_REMAPPED(Z2, X_MAX) - #define Z2_USE_ENDSTOP _XMAX_ + #define Z2_STOP_PIN X_MAX_PIN #elif DIAG_REMAPPED(Z2, Y_MAX) - #define Z2_USE_ENDSTOP _YMAX_ + #define Z2_STOP_PIN Y_MAX_PIN #elif DIAG_REMAPPED(Z2, Z_MAX) - #define Z2_USE_ENDSTOP _ZMAX_ + #define Z2_STOP_PIN Z_MAX_PIN #else - #define Z2_USE_ENDSTOP _En_DIAG_(Z2_E_INDEX) + #define Z2_STOP_PIN _En_DIAG_PIN(Z2_E_INDEX) #endif #define AUTO_ASSIGNED_Z2_DIAG 1 #endif @@ -952,7 +963,8 @@ #define Z2_MS3_PIN -1 #endif -#if NUM_Z_STEPPERS >= 3 && !defined(Z3_DIAG_PIN) && !defined(Z3_STEP_PIN) && !PIN_EXISTS(Z3_CS_PIN) +// Z3 auto-assignment will use up an E stepper, but not if it's chained +#if NUM_Z_STEPPERS >= 3 && !defined(Z3_STEP_PIN) && !PIN_EXISTS(Z3_CS_PIN) #define Z4_E_INDEX INCREMENT(Z3_E_INDEX) #else #define Z4_E_INDEX Z3_E_INDEX @@ -1003,21 +1015,21 @@ #endif #endif // Auto-assign pins for stallGuard sensorless homing - #if !defined(Z3_DIAG_PIN) && !defined(Z3_USE_ENDSTOP) && defined(Z3_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && _PEXI(Z3_E_INDEX, DIAG) + #if !defined(Z3_STOP_PIN) && defined(Z3_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && E_DIAG_EXISTS(Z3_E_INDEX) #if DIAG_REMAPPED(Z3, X_MIN) - #define Z3_USE_ENDSTOP _XMIN_ + #define Z3_STOP_PIN X_MIN_PIN #elif DIAG_REMAPPED(Z3, Y_MIN) - #define Z3_USE_ENDSTOP _YMIN_ + #define Z3_STOP_PIN Y_MIN_PIN #elif DIAG_REMAPPED(Z3, Z_MIN) - #define Z3_USE_ENDSTOP _ZMIN_ + #define Z3_STOP_PIN Z_MIN_PIN #elif DIAG_REMAPPED(Z3, X_MAX) - #define Z3_USE_ENDSTOP _XMAX_ + #define Z3_STOP_PIN X_MAX_PIN #elif DIAG_REMAPPED(Z3, Y_MAX) - #define Z3_USE_ENDSTOP _YMAX_ + #define Z3_STOP_PIN Y_MAX_PIN #elif DIAG_REMAPPED(Z3, Z_MAX) - #define Z3_USE_ENDSTOP _ZMAX_ + #define Z3_STOP_PIN Z_MAX_PIN #else - #define Z3_USE_ENDSTOP _En_DIAG_(Z3_E_INDEX) + #define Z3_STOP_PIN _En_DIAG_PIN(Z3_E_INDEX) #endif #define AUTO_ASSIGNED_Z3_DIAG 1 #endif @@ -1036,7 +1048,8 @@ #define Z3_MS3_PIN -1 #endif -#if NUM_Z_STEPPERS >= 4 && !defined(Z4_DIAG_PIN) && !defined(Z4_STEP_PIN) && !PIN_EXISTS(Z4_CS_PIN) +// Z4 auto-assignment will use up an E stepper, but not if it's chained +#if NUM_Z_STEPPERS >= 4 && !defined(Z4_STEP_PIN) && !PIN_EXISTS(Z4_CS_PIN) #define I_E_INDEX INCREMENT(Z4_E_INDEX) #else #define I_E_INDEX Z4_E_INDEX @@ -1087,21 +1100,21 @@ #endif #endif // Auto-assign pins for stallGuard sensorless homing - #if !defined(Z4_DIAG_PIN) && !defined(Z4_USE_ENDSTOP) && defined(Z4_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && _PEXI(Z4_E_INDEX, DIAG) + #if !defined(Z4_STOP_PIN) && defined(Z4_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && E_DIAG_EXISTS(Z4_E_INDEX) #if DIAG_REMAPPED(Z4, X_MIN) - #define Z4_USE_ENDSTOP _XMIN_ + #define Z4_STOP_PIN X_MIN_PIN #elif DIAG_REMAPPED(Z4, Y_MIN) - #define Z4_USE_ENDSTOP _YMIN_ + #define Z4_STOP_PIN Y_MIN_PIN #elif DIAG_REMAPPED(Z4, Z_MIN) - #define Z4_USE_ENDSTOP _ZMIN_ + #define Z4_STOP_PIN Z_MIN_PIN #elif DIAG_REMAPPED(Z4, X_MAX) - #define Z4_USE_ENDSTOP _XMAX_ + #define Z4_STOP_PIN X_MAX_PIN #elif DIAG_REMAPPED(Z4, Y_MAX) - #define Z4_USE_ENDSTOP _YMAX_ + #define Z4_STOP_PIN Y_MAX_PIN #elif DIAG_REMAPPED(Z4, Z_MAX) - #define Z4_USE_ENDSTOP _ZMAX_ + #define Z4_STOP_PIN Z_MAX_PIN #else - #define Z4_USE_ENDSTOP _En_DIAG_(Z4_E_INDEX) + #define Z4_STOP_PIN _En_DIAG_PIN(Z4_E_INDEX) #endif #define AUTO_ASSIGNED_Z4_DIAG 1 #endif @@ -1120,7 +1133,8 @@ #define Z4_MS3_PIN -1 #endif -#if HAS_I_AXIS && !defined(I_DIAG_PIN) && !defined(I_STEP_PIN) && !PIN_EXISTS(I_CS_PIN) +// I auto-assignment will use up an E stepper, but not if it's chained +#if HAS_I_AXIS && !defined(I_STEP_PIN) && !PIN_EXISTS(I_CS_PIN) #define J_E_INDEX INCREMENT(I_E_INDEX) #else #define J_E_INDEX I_E_INDEX @@ -1171,21 +1185,21 @@ #endif #endif // Auto-assign pins for stallGuard sensorless homing - #if !defined(I_DIAG_PIN) && !defined(I_USE_ENDSTOP) && defined(I_STALL_SENSITIVITY) && _PEXI(I_E_INDEX, DIAG) + #if !defined(I_STOP_PIN) && defined(I_STALL_SENSITIVITY) && E_DIAG_EXISTS(I_E_INDEX) #if DIAG_REMAPPED(I, X_MIN) - #define I_USE_ENDSTOP _XMIN_ + #define I_STOP_PIN X_MIN_PIN #elif DIAG_REMAPPED(I, Y_MIN) - #define I_USE_ENDSTOP _YMIN_ + #define I_STOP_PIN Y_MIN_PIN #elif DIAG_REMAPPED(I, Z_MIN) - #define I_USE_ENDSTOP _ZMIN_ + #define I_STOP_PIN Z_MIN_PIN #elif DIAG_REMAPPED(I, X_MAX) - #define I_USE_ENDSTOP _XMAX_ + #define I_STOP_PIN X_MAX_PIN #elif DIAG_REMAPPED(I, Y_MAX) - #define I_USE_ENDSTOP _YMAX_ + #define I_STOP_PIN Y_MAX_PIN #elif DIAG_REMAPPED(I, Z_MAX) - #define I_USE_ENDSTOP _ZMAX_ + #define I_STOP_PIN Z_MAX_PIN #else - #define I_USE_ENDSTOP _En_DIAG_(I_E_INDEX) + #define I_STOP_PIN _En_DIAG_PIN(I_E_INDEX) #endif #define AUTO_ASSIGNED_I_DIAG 1 #endif @@ -1204,7 +1218,8 @@ #define I_MS3_PIN -1 #endif -#if HAS_J_AXIS && !defined(J_DIAG_PIN) && !defined(J_STEP_PIN) && !PIN_EXISTS(J_CS_PIN) +// J auto-assignment will use up an E stepper, but not if it's chained +#if HAS_J_AXIS && !defined(J_STEP_PIN) && !PIN_EXISTS(J_CS_PIN) #define K_E_INDEX INCREMENT(J_E_INDEX) #else #define K_E_INDEX J_E_INDEX @@ -1255,21 +1270,21 @@ #endif #endif // Auto-assign pins for stallGuard sensorless homing - #if !defined(J_DIAG_PIN) && !defined(J_USE_ENDSTOP) && defined(J_STALL_SENSITIVITY) && _PEXI(J_E_INDEX, DIAG) + #if !defined(J_STOP_PIN) && defined(J_STALL_SENSITIVITY) && E_DIAG_EXISTS(J_E_INDEX) #if DIAG_REMAPPED(J, X_MIN) - #define J_USE_ENDSTOP _XMIN_ + #define J_STOP_PIN X_MIN_PIN #elif DIAG_REMAPPED(J, Y_MIN) - #define J_USE_ENDSTOP _YMIN_ + #define J_STOP_PIN Y_MIN_PIN #elif DIAG_REMAPPED(J, Z_MIN) - #define J_USE_ENDSTOP _ZMIN_ + #define J_STOP_PIN Z_MIN_PIN #elif DIAG_REMAPPED(J, X_MAX) - #define J_USE_ENDSTOP _XMAX_ + #define J_STOP_PIN X_MAX_PIN #elif DIAG_REMAPPED(J, Y_MAX) - #define J_USE_ENDSTOP _YMAX_ + #define J_STOP_PIN Y_MAX_PIN #elif DIAG_REMAPPED(I, Z_MAX) - #define J_USE_ENDSTOP _ZMAX_ + #define J_STOP_PIN Z_MAX_PIN #else - #define J_USE_ENDSTOP _En_DIAG_(J_E_INDEX) + #define J_STOP_PIN _En_DIAG_PIN(J_E_INDEX) #endif #define AUTO_ASSIGNED_J_DIAG 1 #endif @@ -1288,7 +1303,8 @@ #define J_MS3_PIN -1 #endif -#if HAS_K_AXIS && !defined(K_DIAG_PIN) && !defined(K_STEP_PIN) && !PIN_EXISTS(K_CS_PIN) +// K auto-assignment will use up an E stepper, but not if it's chained +#if HAS_K_AXIS && !defined(K_STEP_PIN) && !PIN_EXISTS(K_CS_PIN) #define U_E_INDEX INCREMENT(K_E_INDEX) #else #define U_E_INDEX K_E_INDEX @@ -1339,21 +1355,21 @@ #endif #endif // Auto-assign pins for stallGuard sensorless homing - #if !defined(K_DIAG_PIN) && !defined(K_USE_ENDSTOP) && defined(K_STALL_SENSITIVITY) && _PEXI(K_E_INDEX, DIAG) + #if !defined(K_STOP_PIN) && defined(K_STALL_SENSITIVITY) && E_DIAG_EXISTS(K_E_INDEX) #if DIAG_REMAPPED(K, X_MIN) - #define K_USE_ENDSTOP _XMIN_ + #define K_STOP_PIN X_MIN_PIN #elif DIAG_REMAPPED(K, Y_MIN) - #define K_USE_ENDSTOP _YMIN_ + #define K_STOP_PIN Y_MIN_PIN #elif DIAG_REMAPPED(K, Z_MIN) - #define K_USE_ENDSTOP _ZMIN_ + #define K_STOP_PIN Z_MIN_PIN #elif DIAG_REMAPPED(K, X_MAX) - #define K_USE_ENDSTOP _XMAX_ + #define K_STOP_PIN X_MAX_PIN #elif DIAG_REMAPPED(K, Y_MAX) - #define K_USE_ENDSTOP _YMAX_ + #define K_STOP_PIN Y_MAX_PIN #elif DIAG_REMAPPED(K, Z_MAX) - #define K_USE_ENDSTOP _ZMAX_ + #define K_STOP_PIN Z_MAX_PIN #else - #define K_USE_ENDSTOP _En_DIAG_(K_E_INDEX) + #define K_STOP_PIN _En_DIAG_PIN(K_E_INDEX) #endif #define AUTO_ASSIGNED_K_DIAG 1 #endif @@ -1372,7 +1388,8 @@ #define K_MS3_PIN -1 #endif -#if HAS_U_AXIS && !defined(U_DIAG_PIN) && !defined(U_STEP_PIN) && !PIN_EXISTS(U_CS_PIN) +// U auto-assignment will use up an E stepper, but not if it's chained +#if HAS_U_AXIS && !defined(U_STEP_PIN) && !PIN_EXISTS(U_CS_PIN) #define V_E_INDEX INCREMENT(U_E_INDEX) #else #define V_E_INDEX U_E_INDEX @@ -1423,21 +1440,21 @@ #endif #endif // Auto-assign pins for stallGuard sensorless homing - #if !defined(U_DIAG_PIN) && !defined(U_USE_ENDSTOP) && defined(U_STALL_SENSITIVITY) && _PEXI(U_E_INDEX, DIAG) + #if !defined(U_STOP_PIN) && defined(U_STALL_SENSITIVITY) && E_DIAG_EXISTS(U_E_INDEX) #if DIAG_REMAPPED(U, X_MIN) - #define U_USE_ENDSTOP _XMIN_ + #define U_STOP_PIN X_MIN_PIN #elif DIAG_REMAPPED(U, Y_MIN) - #define U_USE_ENDSTOP _YMIN_ + #define U_STOP_PIN Y_MIN_PIN #elif DIAG_REMAPPED(U, Z_MIN) - #define U_USE_ENDSTOP _ZMIN_ + #define U_STOP_PIN Z_MIN_PIN #elif DIAG_REMAPPED(U, X_MAX) - #define U_USE_ENDSTOP _XMAX_ + #define U_STOP_PIN X_MAX_PIN #elif DIAG_REMAPPED(U, Y_MAX) - #define U_USE_ENDSTOP _YMAX_ + #define U_STOP_PIN Y_MAX_PIN #elif DIAG_REMAPPED(U, Z_MAX) - #define U_USE_ENDSTOP _ZMAX_ + #define U_STOP_PIN Z_MAX_PIN #else - #define U_USE_ENDSTOP _En_DIAG_(U_E_INDEX) + #define U_STOP_PIN _En_DIAG_PIN(U_E_INDEX) #endif #define AUTO_ASSIGNED_U_DIAG 1 #endif @@ -1456,7 +1473,8 @@ #define U_MS3_PIN -1 #endif -#if HAS_V_AXIS && !defined(V_DIAG_PIN) && !defined(V_STEP_PIN) && !PIN_EXISTS(V_CS_PIN) +// V auto-assignment will use up an E stepper, but not if it's chained +#if HAS_V_AXIS && !defined(V_STEP_PIN) && !PIN_EXISTS(V_CS_PIN) #define W_E_INDEX INCREMENT(V_E_INDEX) #else #define W_E_INDEX V_E_INDEX @@ -1507,21 +1525,21 @@ #endif #endif // Auto-assign pins for stallGuard sensorless homing - #if !defined(V_DIAG_PIN) && !defined(V_USE_ENDSTOP) && defined(V_STALL_SENSITIVITY) && _PEXI(V_E_INDEX, DIAG) + #if !defined(V_STOP_PIN) && defined(V_STALL_SENSITIVITY) && E_DIAG_EXISTS(V_E_INDEX) #if DIAG_REMAPPED(V, X_MIN) - #define V_USE_ENDSTOP _XMIN_ + #define V_STOP_PIN X_MIN_PIN #elif DIAG_REMAPPED(V, Y_MIN) - #define V_USE_ENDSTOP _YMIN_ + #define V_STOP_PIN Y_MIN_PIN #elif DIAG_REMAPPED(V, Z_MIN) - #define V_USE_ENDSTOP _ZMIN_ + #define V_STOP_PIN Z_MIN_PIN #elif DIAG_REMAPPED(V, X_MAX) - #define V_USE_ENDSTOP _XMAX_ + #define V_STOP_PIN X_MAX_PIN #elif DIAG_REMAPPED(V, Y_MAX) - #define V_USE_ENDSTOP _YMAX_ + #define V_STOP_PIN Y_MAX_PIN #elif DIAG_REMAPPED(V, Z_MAX) - #define V_USE_ENDSTOP _ZMAX_ + #define V_STOP_PIN Z_MAX_PIN #else - #define V_USE_ENDSTOP _En_DIAG_(V_E_INDEX) + #define V_STOP_PIN _En_DIAG_PIN(V_E_INDEX) #endif #define AUTO_ASSIGNED_V_DIAG 1 #endif @@ -1585,21 +1603,21 @@ #endif #endif // Auto-assign pins for stallGuard sensorless homing - #if !defined(W_DIAG_PIN) && !defined(W_USE_ENDSTOP) && defined(W_STALL_SENSITIVITY) && _PEXI(W_E_INDEX, DIAG) + #if !defined(W_STOP_PIN) && defined(W_STALL_SENSITIVITY) && E_DIAG_EXISTS(W_E_INDEX) #if DIAG_REMAPPED(W, X_MIN) - #define W_USE_ENDSTOP _XMIN_ + #define W_STOP_PIN X_MIN_PIN #elif DIAG_REMAPPED(W, Y_MIN) - #define W_USE_ENDSTOP _YMIN_ + #define W_STOP_PIN Y_MIN_PIN #elif DIAG_REMAPPED(W, Z_MIN) - #define W_USE_ENDSTOP _ZMIN_ + #define W_STOP_PIN Z_MIN_PIN #elif DIAG_REMAPPED(W, X_MAX) - #define W_USE_ENDSTOP _XMAX_ + #define W_STOP_PIN X_MAX_PIN #elif DIAG_REMAPPED(W, Y_MAX) - #define W_USE_ENDSTOP _YMAX_ + #define W_STOP_PIN Y_MAX_PIN #elif DIAG_REMAPPED(W, Z_MAX) - #define W_USE_ENDSTOP _ZMAX_ + #define W_STOP_PIN Z_MAX_PIN #else - #define W_USE_ENDSTOP _En_DIAG_(W_E_INDEX) + #define W_STOP_PIN _En_DIAG_PIN(W_E_INDEX) #endif #define AUTO_ASSIGNED_W_DIAG 1 #endif @@ -1618,670 +1636,52 @@ #define W_MS3_PIN -1 #endif -// -// Disable unused endstop / probe pins -// -#define _STOP_IN_USE(N) (X2_USE_ENDSTOP == N || Y2_USE_ENDSTOP == N || Z2_USE_ENDSTOP == N || Z3_USE_ENDSTOP == N || Z4_USE_ENDSTOP == N) -#if !defined(USE_XMAX_PLUG) && _STOP_IN_USE(_XMAX_) - #define USE_XMAX_PLUG -#endif -#if !defined(USE_YMAX_PLUG) && _STOP_IN_USE(_YMAX_) - #define USE_YMAX_PLUG -#endif -#if !defined(USE_ZMAX_PLUG) && _STOP_IN_USE(_ZMAX_) - #define USE_ZMAX_PLUG -#endif -#if !defined(USE_IMAX_PLUG) && _STOP_IN_USE(_IMAX_) - #define USE_IMAX_PLUG -#endif -#if !defined(USE_JMAX_PLUG) && _STOP_IN_USE(_JMAX_) - #define USE_JMAX_PLUG -#endif -#if !defined(USE_KMAX_PLUG) && _STOP_IN_USE(_KMAX_) - #define USE_KMAX_PLUG -#endif -#if !defined(USE_UMAX_PLUG) && _STOP_IN_USE(_UMAX_) - #define USE_UMAX_PLUG -#endif -#if !defined(USE_VMAX_PLUG) && _STOP_IN_USE(_VMAX_) - #define USE_VMAX_PLUG -#endif -#if !defined(USE_WMAX_PLUG) && _STOP_IN_USE(_WMAX_) - #define USE_WMAX_PLUG -#endif -#if !defined(USE_XMIN_PLUG) && _STOP_IN_USE(_XMIN_) - #define USE_XMIN_PLUG -#endif -#if !defined(USE_YMIN_PLUG) && _STOP_IN_USE(_YMIN_) - #define USE_YMIN_PLUG -#endif -#if !defined(USE_ZMIN_PLUG) && _STOP_IN_USE(_ZMIN_) - #define USE_ZMIN_PLUG -#endif -#if !defined(USE_IMIN_PLUG) && _STOP_IN_USE(_IMIN_) - #define USE_IMIN_PLUG -#endif -#if !defined(USE_JMIN_PLUG) && _STOP_IN_USE(_JMIN_) - #define USE_JMIN_PLUG -#endif -#if !defined(USE_KMIN_PLUG) && _STOP_IN_USE(_KMIN_) - #define USE_KMIN_PLUG -#endif -#if !defined(USE_UMIN_PLUG) && _STOP_IN_USE(_UMIN_) - #define USE_UMIN_PLUG -#endif -#if !defined(USE_VMIN_PLUG) && _STOP_IN_USE(_VMIN_) - #define USE_VMIN_PLUG -#endif -#if !defined(USE_WMIN_PLUG) && _STOP_IN_USE(_WMIN_) - #define USE_WMIN_PLUG -#endif -#undef _STOP_IN_USE -#if !USES_Z_MIN_PROBE_PIN - #undef Z_MIN_PROBE_PIN - #define Z_MIN_PROBE_PIN -1 -#endif -#if DISABLED(USE_XMIN_PLUG) - #undef X_MIN_PIN - #define X_MIN_PIN -1 -#endif -#if DISABLED(USE_XMAX_PLUG) - #undef X_MAX_PIN - #define X_MAX_PIN -1 -#endif -#if NONE(USE_XMIN_PLUG, USE_XMAX_PLUG) - #undef X_STOP_PIN -#endif -#if DISABLED(USE_YMIN_PLUG) - #undef Y_MIN_PIN - #define Y_MIN_PIN -1 -#endif -#if DISABLED(USE_YMAX_PLUG) - #undef Y_MAX_PIN - #define Y_MAX_PIN -1 -#endif -#if NONE(USE_YMIN_PLUG, USE_YMAX_PLUG) - #undef Y_STOP_PIN -#endif -#if DISABLED(USE_ZMIN_PLUG) - #undef Z_MIN_PIN - #define Z_MIN_PIN -1 -#endif -#if DISABLED(USE_ZMAX_PLUG) - #undef Z_MAX_PIN - #define Z_MAX_PIN -1 -#endif -#if NONE(USE_ZMIN_PLUG, USE_ZMAX_PLUG) - #undef Z_STOP_PIN -#endif -#if DISABLED(USE_IMIN_PLUG) - #undef I_MIN_PIN - #define I_MIN_PIN -1 -#endif -#if DISABLED(USE_IMAX_PLUG) - #undef I_MAX_PIN - #define I_MAX_PIN -1 -#endif -#if NONE(USE_IMIN_PLUG, USE_IMAX_PLUG) - #undef I_STOP_PIN -#endif -#if DISABLED(USE_JMIN_PLUG) - #undef J_MIN_PIN - #define J_MIN_PIN -1 -#endif -#if DISABLED(USE_JMAX_PLUG) - #undef J_MAX_PIN - #define J_MAX_PIN -1 -#endif -#if NONE(USE_JMIN_PLUG, USE_JMAX_PLUG) - #undef J_STOP_PIN -#endif -#if DISABLED(USE_KMIN_PLUG) - #undef K_MIN_PIN - #define K_MIN_PIN -1 -#endif -#if DISABLED(USE_KMAX_PLUG) - #undef K_MAX_PIN - #define K_MAX_PIN -1 -#endif -#if NONE(USE_KMIN_PLUG, USE_KMAX_PLUG) - #undef K_STOP_PIN -#endif -#if DISABLED(USE_UMIN_PLUG) - #undef U_MIN_PIN - #define U_MIN_PIN -1 -#endif -#if DISABLED(USE_UMAX_PLUG) - #undef U_MAX_PIN - #define U_MAX_PIN -1 -#endif -#if NONE(USE_UMIN_PLUG, USE_UMAX_PLUG) - #undef U_STOP_PIN -#endif -#if DISABLED(USE_VMIN_PLUG) - #undef V_MIN_PIN - #define V_MIN_PIN -1 -#endif -#if DISABLED(USE_VMAX_PLUG) - #undef V_MAX_PIN - #define V_MAX_PIN -1 -#endif -#if NONE(USE_VMIN_PLUG, USE_VMAX_PLUG) - #undef V_STOP_PIN -#endif -#if DISABLED(USE_WMIN_PLUG) - #undef W_MIN_PIN - #define W_MIN_PIN -1 -#endif -#if DISABLED(USE_WMAX_PLUG) - #undef W_MAX_PIN - #define W_MAX_PIN -1 -#endif -#if NONE(USE_WMIN_PLUG, USE_WMAX_PLUG) - #undef W_STOP_PIN -#endif - -#if DISABLED(X_DUAL_ENDSTOPS) || X_HOME_TO_MAX - #undef X2_MIN_PIN -#endif -#if DISABLED(X_DUAL_ENDSTOPS) || X_HOME_TO_MIN - #undef X2_MAX_PIN -#endif -#if DISABLED(Y_DUAL_ENDSTOPS) || Y_HOME_TO_MAX - #undef Y2_MIN_PIN -#endif -#if DISABLED(Y_DUAL_ENDSTOPS) || Y_HOME_TO_MIN - #undef Y2_MAX_PIN -#endif -#if DISABLED(Z_MULTI_ENDSTOPS) || Z_HOME_TO_MAX - #undef Z2_MIN_PIN -#endif -#if DISABLED(Z_MULTI_ENDSTOPS) || Z_HOME_TO_MIN - #undef Z2_MAX_PIN -#endif -#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPERS < 3 || Z_HOME_TO_MAX - #undef Z3_MIN_PIN -#endif -#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPERS < 3 || Z_HOME_TO_MIN - #undef Z3_MAX_PIN -#endif -#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPERS < 4 || Z_HOME_TO_MAX - #undef Z4_MIN_PIN -#endif -#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPERS < 4 || Z_HOME_TO_MIN - #undef Z4_MAX_PIN -#endif - /** * X_DUAL_ENDSTOPS endstop reassignment */ #if ENABLED(X_DUAL_ENDSTOPS) - #if X_HOME_TO_MAX && !defined(X2_MAX_PIN) - #if PIN_EXISTS(X2_STOP) - #define X2_MAX_PIN X2_STOP_PIN - #elif X2_USE_ENDSTOP == _XMIN_ - #define X2_MAX_PIN X_MIN_PIN - #elif X2_USE_ENDSTOP == _XMAX_ - #define X2_MAX_PIN X_MAX_PIN - #elif X2_USE_ENDSTOP == _XSTOP_ - #define X2_MAX_PIN X_STOP_PIN - #elif X2_USE_ENDSTOP == _YMIN_ - #define X2_MAX_PIN Y_MIN_PIN - #elif X2_USE_ENDSTOP == _YMAX_ - #define X2_MAX_PIN Y_MAX_PIN - #elif X2_USE_ENDSTOP == _YSTOP_ - #define X2_MAX_PIN Y_STOP_PIN - #elif X2_USE_ENDSTOP == _ZMIN_ - #define X2_MAX_PIN Z_MIN_PIN - #elif X2_USE_ENDSTOP == _ZMAX_ - #define X2_MAX_PIN Z_MAX_PIN - #elif X2_USE_ENDSTOP == _ZSTOP_ - #define X2_MAX_PIN Z_STOP_PIN - #elif X2_USE_ENDSTOP == _XDIAG_ - #define X2_MAX_PIN X_DIAG_PIN - #elif X2_USE_ENDSTOP == _YDIAG_ - #define X2_MAX_PIN Y_DIAG_PIN - #elif X2_USE_ENDSTOP == _ZDIAG_ - #define X2_MAX_PIN Z_DIAG_PIN - #elif X2_USE_ENDSTOP == _E0DIAG_ - #define X2_MAX_PIN E0_DIAG_PIN - #elif X2_USE_ENDSTOP == _E1DIAG_ - #define X2_MAX_PIN E1_DIAG_PIN - #elif X2_USE_ENDSTOP == _E2DIAG_ - #define X2_MAX_PIN E2_DIAG_PIN - #elif X2_USE_ENDSTOP == _E3DIAG_ - #define X2_MAX_PIN E3_DIAG_PIN - #elif X2_USE_ENDSTOP == _E4DIAG_ - #define X2_MAX_PIN E4_DIAG_PIN - #elif X2_USE_ENDSTOP == _E5DIAG_ - #define X2_MAX_PIN E5_DIAG_PIN - #elif X2_USE_ENDSTOP == _E6DIAG_ - #define X2_MAX_PIN E6_DIAG_PIN - #elif X2_USE_ENDSTOP == _E7DIAG_ - #define X2_MAX_PIN E7_DIAG_PIN - #endif - #elif X_HOME_TO_MIN && !defined(X2_MIN_PIN) - #if PIN_EXISTS(X2_STOP) - #define X2_MIN_PIN X2_STOP_PIN - #elif X2_USE_ENDSTOP == _XMIN_ - #define X2_MIN_PIN X_MIN_PIN - #elif X2_USE_ENDSTOP == _XMAX_ - #define X2_MIN_PIN X_MAX_PIN - #elif X2_USE_ENDSTOP == _XSTOP_ - #define X2_MIN_PIN X_STOP_PIN - #elif X2_USE_ENDSTOP == _YMIN_ - #define X2_MIN_PIN Y_MIN_PIN - #elif X2_USE_ENDSTOP == _YMAX_ - #define X2_MIN_PIN Y_MAX_PIN - #elif X2_USE_ENDSTOP == _YSTOP_ - #define X2_MIN_PIN Y_STOP_PIN - #elif X2_USE_ENDSTOP == _ZMIN_ - #define X2_MIN_PIN Z_MIN_PIN - #elif X2_USE_ENDSTOP == _ZMAX_ - #define X2_MIN_PIN Z_MAX_PIN - #elif X2_USE_ENDSTOP == _ZSTOP_ - #define X2_MIN_PIN Z_STOP_PIN - #elif X2_USE_ENDSTOP == _XDIAG_ - #define X2_MIN_PIN X_DIAG_PIN - #elif X2_USE_ENDSTOP == _YDIAG_ - #define X2_MIN_PIN Y_DIAG_PIN - #elif X2_USE_ENDSTOP == _ZDIAG_ - #define X2_MIN_PIN Z_DIAG_PIN - #elif X2_USE_ENDSTOP == _E0DIAG_ - #define X2_MIN_PIN E0_DIAG_PIN - #elif X2_USE_ENDSTOP == _E1DIAG_ - #define X2_MIN_PIN E1_DIAG_PIN - #elif X2_USE_ENDSTOP == _E2DIAG_ - #define X2_MIN_PIN E2_DIAG_PIN - #elif X2_USE_ENDSTOP == _E3DIAG_ - #define X2_MIN_PIN E3_DIAG_PIN - #elif X2_USE_ENDSTOP == _E4DIAG_ - #define X2_MIN_PIN E4_DIAG_PIN - #elif X2_USE_ENDSTOP == _E5DIAG_ - #define X2_MIN_PIN E5_DIAG_PIN - #elif X2_USE_ENDSTOP == _E6DIAG_ - #define X2_MIN_PIN E6_DIAG_PIN - #elif X2_USE_ENDSTOP == _E7DIAG_ - #define X2_MIN_PIN E7_DIAG_PIN - #endif + #if X_HOME_TO_MAX && !defined(X2_MAX_PIN) && PIN_EXISTS(X2_STOP) + #define X2_MAX_PIN X2_STOP_PIN + #elif X_HOME_TO_MIN && !defined(X2_MIN_PIN) && PIN_EXISTS(X2_STOP) + #define X2_MIN_PIN X2_STOP_PIN #endif -#endif // X_DUAL_ENDSTOPS +#endif /** * Y_DUAL_ENDSTOPS endstop reassignment */ #if ENABLED(Y_DUAL_ENDSTOPS) - #if Y_HOME_TO_MAX && !defined(Y2_MAX_PIN) - #if PIN_EXISTS(Y2_STOP) - #define Y2_MAX_PIN Y2_STOP_PIN - #elif Y2_USE_ENDSTOP == _XMIN_ - #define Y2_MAX_PIN X_MIN_PIN - #elif Y2_USE_ENDSTOP == _XMAX_ - #define Y2_MAX_PIN X_MAX_PIN - #elif Y2_USE_ENDSTOP == _XSTOP_ - #define Y2_MAX_PIN X_STOP_PIN - #elif Y2_USE_ENDSTOP == _YMIN_ - #define Y2_MAX_PIN Y_MIN_PIN - #elif Y2_USE_ENDSTOP == _YMAX_ - #define Y2_MAX_PIN Y_MAX_PIN - #elif Y2_USE_ENDSTOP == _YSTOP_ - #define Y2_MAX_PIN Y_STOP_PIN - #elif Y2_USE_ENDSTOP == _ZMIN_ - #define Y2_MAX_PIN Z_MIN_PIN - #elif Y2_USE_ENDSTOP == _ZMAX_ - #define Y2_MAX_PIN Z_MAX_PIN - #elif Y2_USE_ENDSTOP == _ZSTOP_ - #define Y2_MAX_PIN Z_STOP_PIN - #elif Y2_USE_ENDSTOP == _XDIAG_ - #define Y2_MAX_PIN X_DIAG_PIN - #elif Y2_USE_ENDSTOP == _YDIAG_ - #define Y2_MAX_PIN Y_DIAG_PIN - #elif Y2_USE_ENDSTOP == _ZDIAG_ - #define Y2_MAX_PIN Z_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E0DIAG_ - #define Y2_MAX_PIN E0_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E1DIAG_ - #define Y2_MAX_PIN E1_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E2DIAG_ - #define Y2_MAX_PIN E2_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E3DIAG_ - #define Y2_MAX_PIN E3_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E4DIAG_ - #define Y2_MAX_PIN E4_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E5DIAG_ - #define Y2_MAX_PIN E5_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E6DIAG_ - #define Y2_MAX_PIN E6_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E7DIAG_ - #define Y2_MAX_PIN E7_DIAG_PIN - #endif - #elif Y_HOME_TO_MIN && !defined(Y2_MIN_PIN) - #if PIN_EXISTS(Y2_STOP) - #define Y2_MIN_PIN Y2_STOP_PIN - #elif Y2_USE_ENDSTOP == _XMIN_ - #define Y2_MIN_PIN X_MIN_PIN - #elif Y2_USE_ENDSTOP == _XMAX_ - #define Y2_MIN_PIN X_MAX_PIN - #elif Y2_USE_ENDSTOP == _XSTOP_ - #define Y2_MIN_PIN X_STOP_PIN - #elif Y2_USE_ENDSTOP == _YMIN_ - #define Y2_MIN_PIN Y_MIN_PIN - #elif Y2_USE_ENDSTOP == _YMAX_ - #define Y2_MIN_PIN Y_MAX_PIN - #elif Y2_USE_ENDSTOP == _YSTOP_ - #define Y2_MIN_PIN Y_STOP_PIN - #elif Y2_USE_ENDSTOP == _ZMIN_ - #define Y2_MIN_PIN Z_MIN_PIN - #elif Y2_USE_ENDSTOP == _ZMAX_ - #define Y2_MIN_PIN Z_MAX_PIN - #elif Y2_USE_ENDSTOP == _ZSTOP_ - #define Y2_MIN_PIN Z_STOP_PIN - #elif Y2_USE_ENDSTOP == _XDIAG_ - #define Y2_MIN_PIN X_DIAG_PIN - #elif Y2_USE_ENDSTOP == _YDIAG_ - #define Y2_MIN_PIN Y_DIAG_PIN - #elif Y2_USE_ENDSTOP == _ZDIAG_ - #define Y2_MIN_PIN Z_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E0DIAG_ - #define Y2_MIN_PIN E0_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E1DIAG_ - #define Y2_MIN_PIN E1_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E2DIAG_ - #define Y2_MIN_PIN E2_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E3DIAG_ - #define Y2_MIN_PIN E3_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E4DIAG_ - #define Y2_MIN_PIN E4_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E5DIAG_ - #define Y2_MIN_PIN E5_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E6DIAG_ - #define Y2_MIN_PIN E6_DIAG_PIN - #elif Y2_USE_ENDSTOP == _E7DIAG_ - #define Y2_MIN_PIN E7_DIAG_PIN - #endif + #if Y_HOME_TO_MAX && !defined(Y2_MAX_PIN) && PIN_EXISTS(Y2_STOP) + #define Y2_MAX_PIN Y2_STOP_PIN + #elif Y_HOME_TO_MIN && !defined(Y2_MIN_PIN) && PIN_EXISTS(Y2_STOP) + #define Y2_MIN_PIN Y2_STOP_PIN #endif -#endif // Y_DUAL_ENDSTOPS +#endif /** * Z_MULTI_ENDSTOPS endstop reassignment */ #if ENABLED(Z_MULTI_ENDSTOPS) - - #if Z_HOME_TO_MAX && !defined(Z2_MAX_PIN) - #if PIN_EXISTS(Z2_STOP) - #define Z2_MAX_PIN Z2_STOP_PIN - #elif Z2_USE_ENDSTOP == _XMIN_ - #define Z2_MAX_PIN X_MIN_PIN - #elif Z2_USE_ENDSTOP == _XMAX_ - #define Z2_MAX_PIN X_MAX_PIN - #elif Z2_USE_ENDSTOP == _XSTOP_ - #define Z2_MAX_PIN X_STOP_PIN - #elif Z2_USE_ENDSTOP == _YMIN_ - #define Z2_MAX_PIN Y_MIN_PIN - #elif Z2_USE_ENDSTOP == _YMAX_ - #define Z2_MAX_PIN Y_MAX_PIN - #elif Z2_USE_ENDSTOP == _YSTOP_ - #define Z2_MAX_PIN Y_STOP_PIN - #elif Z2_USE_ENDSTOP == _ZMIN_ - #define Z2_MAX_PIN Z_MIN_PIN - #elif Z2_USE_ENDSTOP == _ZMAX_ - #define Z2_MAX_PIN Z_MAX_PIN - #elif Z2_USE_ENDSTOP == _ZSTOP_ - #define Z2_MAX_PIN Z_STOP_PIN - #elif Z2_USE_ENDSTOP == _XDIAG_ - #define Z2_MAX_PIN X_DIAG_PIN - #elif Z2_USE_ENDSTOP == _YDIAG_ - #define Z2_MAX_PIN Y_DIAG_PIN - #elif Z2_USE_ENDSTOP == _ZDIAG_ - #define Z2_MAX_PIN Z_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E0DIAG_ - #define Z2_MAX_PIN E0_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E1DIAG_ - #define Z2_MAX_PIN E1_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E2DIAG_ - #define Z2_MAX_PIN E2_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E3DIAG_ - #define Z2_MAX_PIN E3_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E4DIAG_ - #define Z2_MAX_PIN E4_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E5DIAG_ - #define Z2_MAX_PIN E5_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E6DIAG_ - #define Z2_MAX_PIN E6_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E7DIAG_ - #define Z2_MAX_PIN E7_DIAG_PIN - #endif - #elif Z_HOME_TO_MIN && !defined(Z2_MIN_PIN) - #if PIN_EXISTS(Z2_STOP) - #define Z2_MIN_PIN Z2_STOP_PIN - #elif Z2_USE_ENDSTOP == _XMIN_ - #define Z2_MIN_PIN X_MIN_PIN - #elif Z2_USE_ENDSTOP == _XMAX_ - #define Z2_MIN_PIN X_MAX_PIN - #elif Z2_USE_ENDSTOP == _XSTOP_ - #define Z2_MIN_PIN X_STOP_PIN - #elif Z2_USE_ENDSTOP == _YMIN_ - #define Z2_MIN_PIN Y_MIN_PIN - #elif Z2_USE_ENDSTOP == _YMAX_ - #define Z2_MIN_PIN Y_MAX_PIN - #elif Z2_USE_ENDSTOP == _YSTOP_ - #define Z2_MIN_PIN Y_STOP_PIN - #elif Z2_USE_ENDSTOP == _ZMIN_ - #define Z2_MIN_PIN Z_MIN_PIN - #elif Z2_USE_ENDSTOP == _ZMAX_ - #define Z2_MIN_PIN Z_MAX_PIN - #elif Z2_USE_ENDSTOP == _ZSTOP_ - #define Z2_MIN_PIN Z_STOP_PIN - #elif Z2_USE_ENDSTOP == _XDIAG_ - #define Z2_MIN_PIN X_DIAG_PIN - #elif Z2_USE_ENDSTOP == _YDIAG_ - #define Z2_MIN_PIN Y_DIAG_PIN - #elif Z2_USE_ENDSTOP == _ZDIAG_ - #define Z2_MIN_PIN Z_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E0DIAG_ - #define Z2_MIN_PIN E0_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E1DIAG_ - #define Z2_MIN_PIN E1_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E2DIAG_ - #define Z2_MIN_PIN E2_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E3DIAG_ - #define Z2_MIN_PIN E3_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E4DIAG_ - #define Z2_MIN_PIN E4_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E5DIAG_ - #define Z2_MIN_PIN E5_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E6DIAG_ - #define Z2_MIN_PIN E6_DIAG_PIN - #elif Z2_USE_ENDSTOP == _E7DIAG_ - #define Z2_MIN_PIN E7_DIAG_PIN - #endif + #if Z_HOME_TO_MAX && !defined(Z2_MAX_PIN) && PIN_EXISTS(Z2_STOP) + #define Z2_MAX_PIN Z2_STOP_PIN + #elif Z_HOME_TO_MIN && !defined(Z2_MIN_PIN) && PIN_EXISTS(Z2_STOP) + #define Z2_MIN_PIN Z2_STOP_PIN #endif - #if NUM_Z_STEPPERS >= 3 - #if Z_HOME_TO_MAX && !defined(Z3_MAX_PIN) - #if PIN_EXISTS(Z3_STOP) - #define Z3_MAX_PIN Z3_STOP_PIN - #elif Z3_USE_ENDSTOP == _XMIN_ - #define Z3_MAX_PIN X_MIN_PIN - #elif Z3_USE_ENDSTOP == _XMAX_ - #define Z3_MAX_PIN X_MAX_PIN - #elif Z3_USE_ENDSTOP == _XSTOP_ - #define Z3_MAX_PIN X_STOP_PIN - #elif Z3_USE_ENDSTOP == _YMIN_ - #define Z3_MAX_PIN Y_MIN_PIN - #elif Z3_USE_ENDSTOP == _YMAX_ - #define Z3_MAX_PIN Y_MAX_PIN - #elif Z3_USE_ENDSTOP == _YSTOP_ - #define Z3_MAX_PIN Y_STOP_PIN - #elif Z3_USE_ENDSTOP == _ZMIN_ - #define Z3_MAX_PIN Z_MIN_PIN - #elif Z3_USE_ENDSTOP == _ZMAX_ - #define Z3_MAX_PIN Z_MAX_PIN - #elif Z3_USE_ENDSTOP == _ZSTOP_ - #define Z3_MAX_PIN Z_STOP_PIN - #elif Z3_USE_ENDSTOP == _XDIAG_ - #define Z3_MAX_PIN X_DIAG_PIN - #elif Z3_USE_ENDSTOP == _YDIAG_ - #define Z3_MAX_PIN Y_DIAG_PIN - #elif Z3_USE_ENDSTOP == _ZDIAG_ - #define Z3_MAX_PIN Z_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E0DIAG_ - #define Z3_MAX_PIN E0_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E1DIAG_ - #define Z3_MAX_PIN E1_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E2DIAG_ - #define Z3_MAX_PIN E2_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E3DIAG_ - #define Z3_MAX_PIN E3_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E4DIAG_ - #define Z3_MAX_PIN E4_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E5DIAG_ - #define Z3_MAX_PIN E5_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E6DIAG_ - #define Z3_MAX_PIN E6_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E7DIAG_ - #define Z3_MAX_PIN E7_DIAG_PIN - #endif - #elif Z_HOME_TO_MIN && !defined(Z3_MIN_PIN) - #if PIN_EXISTS(Z3_STOP) - #define Z3_MIN_PIN Z3_STOP_PIN - #elif Z3_USE_ENDSTOP == _XMIN_ - #define Z3_MIN_PIN X_MIN_PIN - #elif Z3_USE_ENDSTOP == _XMAX_ - #define Z3_MIN_PIN X_MAX_PIN - #elif Z3_USE_ENDSTOP == _XSTOP_ - #define Z3_MIN_PIN X_STOP_PIN - #elif Z3_USE_ENDSTOP == _YMIN_ - #define Z3_MIN_PIN Y_MIN_PIN - #elif Z3_USE_ENDSTOP == _YMAX_ - #define Z3_MIN_PIN Y_MAX_PIN - #elif Z3_USE_ENDSTOP == _YSTOP_ - #define Z3_MIN_PIN Y_STOP_PIN - #elif Z3_USE_ENDSTOP == _ZMIN_ - #define Z3_MIN_PIN Z_MIN_PIN - #elif Z3_USE_ENDSTOP == _ZMAX_ - #define Z3_MIN_PIN Z_MAX_PIN - #elif Z3_USE_ENDSTOP == _ZSTOP_ - #define Z3_MIN_PIN Z_STOP_PIN - #elif Z3_USE_ENDSTOP == _XDIAG_ - #define Z3_MIN_PIN X_DIAG_PIN - #elif Z3_USE_ENDSTOP == _YDIAG_ - #define Z3_MIN_PIN Y_DIAG_PIN - #elif Z3_USE_ENDSTOP == _ZDIAG_ - #define Z3_MIN_PIN Z_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E0DIAG_ - #define Z3_MIN_PIN E0_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E1DIAG_ - #define Z3_MIN_PIN E1_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E2DIAG_ - #define Z3_MIN_PIN E2_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E3DIAG_ - #define Z3_MIN_PIN E3_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E4DIAG_ - #define Z3_MIN_PIN E4_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E5DIAG_ - #define Z3_MIN_PIN E5_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E6DIAG_ - #define Z3_MIN_PIN E6_DIAG_PIN - #elif Z3_USE_ENDSTOP == _E7DIAG_ - #define Z3_MIN_PIN E7_DIAG_PIN - #endif + #if Z_HOME_TO_MAX && !defined(Z3_MAX_PIN) && PIN_EXISTS(Z3_STOP) + #define Z3_MAX_PIN Z3_STOP_PIN + #elif Z_HOME_TO_MIN && !defined(Z3_MIN_PIN) && PIN_EXISTS(Z3_STOP) + #define Z3_MIN_PIN Z3_STOP_PIN #endif #endif - #if NUM_Z_STEPPERS >= 4 - #if Z_HOME_TO_MAX && !defined(Z4_MAX_PIN) - #if PIN_EXISTS(Z4_STOP) - #define Z4_MAX_PIN Z4_STOP_PIN - #elif Z4_USE_ENDSTOP == _XMIN_ - #define Z4_MAX_PIN X_MIN_PIN - #elif Z4_USE_ENDSTOP == _XMAX_ - #define Z4_MAX_PIN X_MAX_PIN - #elif Z4_USE_ENDSTOP == _XSTOP_ - #define Z4_MAX_PIN X_STOP_PIN - #elif Z4_USE_ENDSTOP == _YMIN_ - #define Z4_MAX_PIN Y_MIN_PIN - #elif Z4_USE_ENDSTOP == _YMAX_ - #define Z4_MAX_PIN Y_MAX_PIN - #elif Z4_USE_ENDSTOP == _YSTOP_ - #define Z4_MAX_PIN Y_STOP_PIN - #elif Z4_USE_ENDSTOP == _ZMIN_ - #define Z4_MAX_PIN Z_MIN_PIN - #elif Z4_USE_ENDSTOP == _ZMAX_ - #define Z4_MAX_PIN Z_MAX_PIN - #elif Z4_USE_ENDSTOP == _ZSTOP_ - #define Z4_MAX_PIN Z_STOP_PIN - #elif Z4_USE_ENDSTOP == _XDIAG_ - #define Z4_MAX_PIN X_DIAG_PIN - #elif Z4_USE_ENDSTOP == _YDIAG_ - #define Z4_MAX_PIN Y_DIAG_PIN - #elif Z4_USE_ENDSTOP == _ZDIAG_ - #define Z4_MAX_PIN Z_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E0DIAG_ - #define Z4_MAX_PIN E0_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E1DIAG_ - #define Z4_MAX_PIN E1_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E2DIAG_ - #define Z4_MAX_PIN E2_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E3DIAG_ - #define Z4_MAX_PIN E3_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E4DIAG_ - #define Z4_MAX_PIN E4_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E5DIAG_ - #define Z4_MAX_PIN E5_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E6DIAG_ - #define Z4_MAX_PIN E6_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E7DIAG_ - #define Z4_MAX_PIN E7_DIAG_PIN - #endif - #elif Z_HOME_TO_MIN && !defined(Z4_MIN_PIN) - #if PIN_EXISTS(Z4_STOP) - #define Z4_MIN_PIN Z4_STOP_PIN - #elif Z4_USE_ENDSTOP == _XMIN_ - #define Z4_MIN_PIN X_MIN_PIN - #elif Z4_USE_ENDSTOP == _XMAX_ - #define Z4_MIN_PIN X_MAX_PIN - #elif Z4_USE_ENDSTOP == _XSTOP_ - #define Z4_MIN_PIN X_STOP_PIN - #elif Z4_USE_ENDSTOP == _YMIN_ - #define Z4_MIN_PIN Y_MIN_PIN - #elif Z4_USE_ENDSTOP == _YMAX_ - #define Z4_MIN_PIN Y_MAX_PIN - #elif Z4_USE_ENDSTOP == _YSTOP_ - #define Z4_MIN_PIN Y_STOP_PIN - #elif Z4_USE_ENDSTOP == _ZMIN_ - #define Z4_MIN_PIN Z_MIN_PIN - #elif Z4_USE_ENDSTOP == _ZMAX_ - #define Z4_MIN_PIN Z_MAX_PIN - #elif Z4_USE_ENDSTOP == _ZSTOP_ - #define Z4_MIN_PIN Z_STOP_PIN - #elif Z4_USE_ENDSTOP == _XDIAG_ - #define Z4_MIN_PIN X_DIAG_PIN - #elif Z4_USE_ENDSTOP == _YDIAG_ - #define Z4_MIN_PIN Y_DIAG_PIN - #elif Z4_USE_ENDSTOP == _ZDIAG_ - #define Z4_MIN_PIN Z_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E0DIAG_ - #define Z4_MIN_PIN E0_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E1DIAG_ - #define Z4_MIN_PIN E1_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E2DIAG_ - #define Z4_MIN_PIN E2_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E3DIAG_ - #define Z4_MIN_PIN E3_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E4DIAG_ - #define Z4_MIN_PIN E4_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E5DIAG_ - #define Z4_MIN_PIN E5_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E6DIAG_ - #define Z4_MIN_PIN E6_DIAG_PIN - #elif Z4_USE_ENDSTOP == _E7DIAG_ - #define Z4_MIN_PIN E7_DIAG_PIN - #endif + #if Z_HOME_TO_MAX && !defined(Z4_MAX_PIN) && PIN_EXISTS(Z4_STOP) + #define Z4_MAX_PIN Z4_STOP_PIN + #elif Z_HOME_TO_MIN && !defined(Z4_MIN_PIN) && PIN_EXISTS(Z4_STOP) + #define Z4_MIN_PIN Z4_STOP_PIN #endif #endif - -#endif // Z_MULTI_ENDSTOPS +#endif // // Default DOGLCD SPI delays @@ -2307,3 +1707,5 @@ #undef HAS_FREE_AUX2_PINS #undef DIAG_REMAPPED +#undef _E_DIAG_EXISTS +#undef E_DIAG_EXISTS diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h index 8997a5f1db..06f697e270 100644 --- a/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h +++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h @@ -190,6 +190,7 @@ #define Z2_DIR_PIN PD0 #endif +// TODO: Use different pin names for auto-remapping #ifdef OPTION_Z2_ENDSTOP #define Z2_MIN_PIN PD1 #define Z2_MAX_PIN PB12 diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h index b60cca831b..24c7404360 100644 --- a/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h +++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h @@ -156,6 +156,7 @@ #define Y_MAX_PIN PB14 #define Z_MAX_PIN PB13 +// TODO: Use different pin names for auto-remapping #ifdef OPTION_Z2_ENDSTOP #define Z2_MIN_PIN PD1 #define Z2_MAX_PIN PB12 diff --git a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h index 7e3f070786..0ed0177da8 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h @@ -51,11 +51,7 @@ #define Z_STOP_PIN PC2 // Z-STOP #if ENABLED(BTT_E3_RRF_IDEX_BOARD) - #if X2_USE_ENDSTOP == _XMAX_ - #define X_MAX_PIN FPC2_PIN // X2-STOP - #elif X2_USE_ENDSTOP == _XMIN_ - #define X_MIN_PIN FPC2_PIN // X2-STOP - #endif + #define X2_STOP_PIN FPC2_PIN // X2-STOP #endif // diff --git a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h index b81859dd61..6021810f40 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h @@ -106,11 +106,21 @@ // Pins on the extender // #if ENABLED(M5_EXTENDER) - #define X2_STOP_PIN PI4 // M5 M1_STOP - #define Y2_STOP_PIN PF12 // M5 M5_STOP - #define Z2_STOP_PIN PF4 // M5 M2_STOP - #define Z3_STOP_PIN PI7 // M5 M4_STOP - #define Z4_STOP_PIN PF6 // M5 M3_STOP + #ifndef X2_STOP_PIN + #define X2_STOP_PIN PI4 // M5 M1_STOP + #endif + #ifndef Y2_STOP_PIN + #define Y2_STOP_PIN PF12 // M5 M5_STOP + #endif + #ifndef Z2_STOP_PIN + #define Z2_STOP_PIN PF4 // M5 M2_STOP + #endif + #ifndef Z3_STOP_PIN + #define Z3_STOP_PIN PI7 // M5 M4_STOP + #endif + #ifndef Z4_STOP_PIN + #define Z4_STOP_PIN PF6 // M5 M3_STOP + #endif #endif #ifndef Z_MIN_PROBE_PIN diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h index d69d8fbef0..bf08aca0fe 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -68,23 +68,6 @@ #define Z_MIN_PROBE_PIN PB7 #endif -// -// Check for additional used endstop pins -// -#if HAS_EXTRA_ENDSTOPS - #define _ENDSTOP_IS_ANY(ES) X2_USE_ENDSTOP == ES || Y2_USE_ENDSTOP == ES || Z2_USE_ENDSTOP == ES || Z3_USE_ENDSTOP == ES || Z4_USE_ENDSTOP == ES - #if _ENDSTOP_IS_ANY(_XMIN_) || _ENDSTOP_IS_ANY(_XMAX_) - #define NEEDS_X_MINMAX - #endif - #if _ENDSTOP_IS_ANY(_YMIN_) || _ENDSTOP_IS_ANY(_YMAX_) - #define NEEDS_Y_MINMAX - #endif - #if _ENDSTOP_IS_ANY(_ZMIN_) || _ENDSTOP_IS_ANY(_ZMAX_) - #define NEEDS_Z_MINMAX - #endif - #undef _ENDSTOP_IS_ANY -#endif - // // Limit Switches // @@ -95,7 +78,7 @@ #else #define X_MIN_PIN E0_DIAG_PIN // E0DET #endif -#elif EITHER(DUAL_X_CARRIAGE, NEEDS_X_MINMAX) +#elif NEEDS_X_MINMAX #ifndef X_MIN_PIN #define X_MIN_PIN X_DIAG_PIN // X-STOP #endif @@ -113,7 +96,7 @@ #else #define Y_MIN_PIN E1_DIAG_PIN // E1DET #endif -#elif ENABLED(NEEDS_Y_MINMAX) +#elif NEEDS_Y_MINMAX #ifndef Y_MIN_PIN #define Y_MIN_PIN Y_DIAG_PIN // Y-STOP #endif @@ -131,7 +114,7 @@ #else #define Z_MIN_PIN E2_DIAG_PIN // PWRDET #endif -#elif ENABLED(NEEDS_Z_MINMAX) +#elif NEEDS_Z_MINMAX #ifndef Z_MIN_PIN #define Z_MIN_PIN Z_DIAG_PIN // Z-STOP #endif diff --git a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h index c4a7cd886f..d26e541d4c 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h @@ -53,29 +53,12 @@ #define E1_DIAG_PIN PC5 // NEOPIXEL #define E2_DIAG_PIN PB14 // Z+ -// -// Check for additional used endstop pins -// -#if HAS_EXTRA_ENDSTOPS - #define _ENDSTOP_IS_ANY(ES) X2_USE_ENDSTOP == ES || Y2_USE_ENDSTOP == ES || Z2_USE_ENDSTOP == ES || Z3_USE_ENDSTOP == ES || Z4_USE_ENDSTOP == ES - #if _ENDSTOP_IS_ANY(_XMIN_) || _ENDSTOP_IS_ANY(_XMAX_) - #define NEEDS_X_MINMAX - #endif - #if _ENDSTOP_IS_ANY(_YMIN_) || _ENDSTOP_IS_ANY(_YMAX_) - #define NEEDS_Y_MINMAX - #endif - #if _ENDSTOP_IS_ANY(_ZMIN_) || _ENDSTOP_IS_ANY(_ZMAX_) - #define NEEDS_Z_MINMAX - #endif - #undef _ENDSTOP_IS_ANY -#endif - // // Limit Switches // #ifdef X_STALL_SENSITIVITY #define X_STOP_PIN X_DIAG_PIN // X- -#elif EITHER(DUAL_X_CARRIAGE, NEEDS_X_MINMAX) +#elif NEEDS_X_MINMAX #ifndef X_MIN_PIN #define X_MIN_PIN X_DIAG_PIN // X- #endif @@ -88,7 +71,7 @@ #ifdef Y_STALL_SENSITIVITY #define Y_STOP_PIN Y_DIAG_PIN // Y- -#elif ENABLED(NEEDS_Y_MINMAX) +#elif NEEDS_Y_MINMAX #ifndef Y_MIN_PIN #define Y_MIN_PIN Y_DIAG_PIN // Y- #endif @@ -101,7 +84,7 @@ #ifdef Z_STALL_SENSITIVITY #define Z_STOP_PIN Z_DIAG_PIN // Z- -#elif ENABLED(NEEDS_Z_MINMAX) +#elif NEEDS_Z_MINMAX #ifndef Z_MIN_PIN #define Z_MIN_PIN Z_DIAG_PIN // Z- #endif @@ -113,7 +96,7 @@ #endif #if DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) || ENABLED(USE_PROBE_FOR_Z_HOMING) - #ifndef Z_MIN_PROBE + #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN E2_DIAG_PIN // defaults to 'Z+' connector #endif #endif diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h index bd9a1cf0b5..792f473d92 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h @@ -75,20 +75,6 @@ //#define Z_MIN_PROBE_PIN PF6 // IND-PROBE (with adjustable voltage & pullup set via jumpers) #endif -// -// Check for additional used endstop pins -// -#if HAS_EXTRA_ENDSTOPS - #define _ENDSTOP_IS_ANY(ES) X2_USE_ENDSTOP == ES || Y2_USE_ENDSTOP == ES || Z2_USE_ENDSTOP == ES || Z3_USE_ENDSTOP == ES || Z4_USE_ENDSTOP == ES - #if _ENDSTOP_IS_ANY(_XMIN_) || _ENDSTOP_IS_ANY(_XMAX_) - #define NEEDS_X_MINMAX - #endif - #if _ENDSTOP_IS_ANY(_YMIN_) || _ENDSTOP_IS_ANY(_YMAX_) - #define NEEDS_Y_MINMAX - #endif - #undef _ENDSTOP_IS_ANY -#endif - // // Limit Switches // @@ -99,7 +85,7 @@ #else #define X_MIN_PIN E0_DIAG_PIN // MIN5 #endif -#elif EITHER(DUAL_X_CARRIAGE, NEEDS_X_MINMAX) +#elif NEEDS_X_MINMAX #ifndef X_MIN_PIN #define X_MIN_PIN X_DIAG_PIN // MIN1 #endif @@ -117,7 +103,7 @@ #else #define Y_MIN_PIN E1_DIAG_PIN // MIN6 #endif -#elif ENABLED(NEEDS_Y_MINMAX) +#elif NEEDS_Y_MINMAX #ifndef Y_MIN_PIN #define Y_MIN_PIN Y_DIAG_PIN // MIN2 #endif diff --git a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h index e8e984fcb7..119c6b3929 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h @@ -68,23 +68,6 @@ #define Z_MIN_PROBE_PIN PB15 #endif -// -// Check for additional used endstop pins -// -#if HAS_EXTRA_ENDSTOPS - #define _ENDSTOP_IS_ANY(ES) X2_USE_ENDSTOP == ES || Y2_USE_ENDSTOP == ES || Z2_USE_ENDSTOP == ES || Z3_USE_ENDSTOP == ES || Z4_USE_ENDSTOP == ES - #if _ENDSTOP_IS_ANY(_XMIN_) || _ENDSTOP_IS_ANY(_XMAX_) - #define NEEDS_X_MINMAX - #endif - #if _ENDSTOP_IS_ANY(_YMIN_) || _ENDSTOP_IS_ANY(_YMAX_) - #define NEEDS_Y_MINMAX - #endif - #if _ENDSTOP_IS_ANY(_ZMIN_) || _ENDSTOP_IS_ANY(_ZMAX_) - #define NEEDS_Z_MINMAX - #endif - #undef _ENDSTOP_IS_ANY -#endif - // // Limit Switches // @@ -95,7 +78,7 @@ #else #define X_MIN_PIN E0_DIAG_PIN // E0DET #endif -#elif EITHER(DUAL_X_CARRIAGE, NEEDS_X_MINMAX) +#elif NEEDS_X_MINMAX #ifndef X_MIN_PIN #define X_MIN_PIN X_DIAG_PIN // X-STOP #endif @@ -113,7 +96,7 @@ #else #define Y_MIN_PIN E1_DIAG_PIN // E1DET #endif -#elif ENABLED(NEEDS_Y_MINMAX) +#elif NEEDS_Y_MINMAX #ifndef Y_MIN_PIN #define Y_MIN_PIN Y_DIAG_PIN // Y-STOP #endif @@ -131,7 +114,7 @@ #else #define Z_MIN_PIN E2_DIAG_PIN // PWRDET #endif -#elif ENABLED(NEEDS_Z_MINMAX) +#elif NEEDS_Z_MINMAX #ifndef Z_MIN_PIN #define Z_MIN_PIN Z_DIAG_PIN // Z-STOP #endif diff --git a/buildroot/tests/DUE b/buildroot/tests/DUE index 4ed234ab3a..c43d30c76e 100755 --- a/buildroot/tests/DUE +++ b/buildroot/tests/DUE @@ -37,7 +37,7 @@ exec_test $1 $2 "RAMPS4DUE_EFB with ABL (Bilinear), ExtUI, S-Curve, many options # restore_configs opt_set MOTHERBOARD BOARD_RADDS Z_DRIVER_TYPE A4988 Z2_DRIVER_TYPE A4988 Z3_DRIVER_TYPE A4988 -opt_enable USE_XMAX_PLUG USE_YMAX_PLUG ENDSTOPPULLUPS BLTOUCH AUTO_BED_LEVELING_BILINEAR \ +opt_enable ENDSTOPPULLUPS BLTOUCH AUTO_BED_LEVELING_BILINEAR \ Z_STEPPER_AUTO_ALIGN Z_STEPPER_ALIGN_STEPPER_XY Z_SAFE_HOMING pins_set ramps/RAMPS X_MAX_PIN -1 pins_set ramps/RAMPS Y_MAX_PIN -1 diff --git a/buildroot/tests/FYSETC_F6 b/buildroot/tests/FYSETC_F6 index 0c5f25a155..dbfb767171 100755 --- a/buildroot/tests/FYSETC_F6 +++ b/buildroot/tests/FYSETC_F6 @@ -43,7 +43,7 @@ opt_set MOTHERBOARD BOARD_FYSETC_F6_13 \ opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER \ MARLIN_BRICKOUT MARLIN_INVADERS MARLIN_SNAKE \ MONITOR_DRIVER_STATUS STEALTHCHOP_XY STEALTHCHOP_Z STEALTHCHOP_E HYBRID_THRESHOLD \ - USE_ZMIN_PLUG SENSORLESS_HOMING TMC_DEBUG M114_DETAIL + SENSORLESS_HOMING TMC_DEBUG M114_DETAIL exec_test $1 $2 "RAMPS | Mixed TMC | Sensorless | RRDFGSC | Games" "$3" # @@ -62,7 +62,7 @@ opt_set MOTHERBOARD BOARD_FYSETC_F6_13 \ X_MAX_ENDSTOP_HIT_STATE HIGH \ X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2130 Z_DRIVER_TYPE TMC2130_STANDALONE E0_DRIVER_TYPE TMC2660 \ X_HARDWARE_SERIAL Serial2 -opt_enable USE_ZMIN_PLUG FIX_MOUNTED_PROBE AUTO_BED_LEVELING_BILINEAR PAUSE_BEFORE_DEPLOY_STOW \ +opt_enable FIX_MOUNTED_PROBE AUTO_BED_LEVELING_BILINEAR PAUSE_BEFORE_DEPLOY_STOW \ FYSETC_242_OLED_12864 EEPROM_SETTINGS EEPROM_CHITCHAT M114_DETAIL Z_SAFE_HOMING \ STEALTHCHOP_XY STEALTHCHOP_Z STEALTHCHOP_E HYBRID_THRESHOLD SENSORLESS_HOMING EDGE_STEPPING exec_test $1 $2 "FYSETC_F6 | SCARA | Mixed TMC | EEPROM" "$3" diff --git a/buildroot/tests/LPC1769 b/buildroot/tests/LPC1769 index cf2838bdd5..733201e009 100755 --- a/buildroot/tests/LPC1769 +++ b/buildroot/tests/LPC1769 @@ -29,7 +29,7 @@ exec_test $1 $2 "Smoothieboard with TFTGLCD_PANEL_SPI and many features" "$3" #restore_configs #opt_set MOTHERBOARD BOARD_AZTEEG_X5_MINI_WIFI -#opt_enable COREYX USE_XMAX_PLUG DAC_MOTOR_CURRENT_DEFAULT \ +#opt_enable COREYX DAC_MOTOR_CURRENT_DEFAULT \ # REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT BABYSTEPPING \ # AUTO_BED_LEVELING_UBL RESTORE_LEVELING_AFTER_G28 EEPROM_SETTINGS \ # FILAMENT_LCD_DISPLAY FILAMENT_WIDTH_SENSOR FAN_SOFT_PWM \ @@ -56,7 +56,7 @@ opt_set MOTHERBOARD BOARD_COHESION3D_REMIX \ opt_enable AUTO_BED_LEVELING_BILINEAR EEPROM_SETTINGS EEPROM_CHITCHAT MECHANICAL_GANTRY_CALIBRATION \ TMC_USE_SW_SPI MONITOR_DRIVER_STATUS STEALTHCHOP_XY STEALTHCHOP_Z HYBRID_THRESHOLD \ SENSORLESS_PROBING Z_SAFE_HOMING X_STALL_SENSITIVITY Y_STALL_SENSITIVITY Z_STALL_SENSITIVITY TMC_DEBUG \ - AXIS4_ROTATES I_MIN_POS I_MAX_POS I_HOME_DIR I_ENABLE_ON USE_IMIN_PLUG INVERT_I_DIR \ + AXIS4_ROTATES I_MIN_POS I_MAX_POS I_HOME_DIR I_ENABLE_ON INVERT_I_DIR \ EXPERIMENTAL_I2CBUS opt_disable PSU_CONTROL Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN exec_test $1 $2 "Cohesion3D Remix DELTA + ABL Bilinear + EEPROM + SENSORLESS_PROBING + I Axis" "$3" diff --git a/buildroot/tests/mega1280 b/buildroot/tests/mega1280 index d948623f48..53016e8406 100755 --- a/buildroot/tests/mega1280 +++ b/buildroot/tests/mega1280 @@ -40,7 +40,7 @@ restore_configs opt_set MOTHERBOARD BOARD_ZRIB_V52 \ LCD_LANGUAGE pt REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 \ EXTRUDERS 2 TEMP_SENSOR_1 1 X2_DRIVER_TYPE A4988 -opt_enable USE_XMAX_PLUG DUAL_X_CARRIAGE REPRAPWORLD_KEYPAD +opt_enable DUAL_X_CARRIAGE REPRAPWORLD_KEYPAD exec_test $1 $2 "ZRIB_V52 | DUAL_X_CARRIAGE" "$3" # diff --git a/buildroot/tests/rambo b/buildroot/tests/rambo index b50f220404..475b2daf87 100755 --- a/buildroot/tests/rambo +++ b/buildroot/tests/rambo @@ -17,7 +17,7 @@ opt_set MOTHERBOARD BOARD_RAMBO \ GRID_MAX_POINTS_X 16 AUTO_POWER_E_TEMP 80 \ FANMUX0_PIN 53 FIL_MOTION1_PIN 45 opt_disable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN USE_WATCHDOG -opt_enable USE_ZMAX_PLUG REPRAP_DISCOUNT_SMART_CONTROLLER LCD_PROGRESS_BAR LCD_PROGRESS_BAR_TEST \ +opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER LCD_PROGRESS_BAR LCD_PROGRESS_BAR_TEST \ FIX_MOUNTED_PROBE CODEPENDENT_XY_HOMING PIDTEMPBED PTC_PROBE PTC_BED \ PREHEAT_BEFORE_PROBING PROBING_HEATERS_OFF PROBING_FANS_OFF PROBING_STEPPERS_OFF WAIT_FOR_BED_HEATER \ EEPROM_SETTINGS SDSUPPORT SD_REPRINT_LAST_SELECTED_FILE BINARY_FILE_TRANSFER \ @@ -53,8 +53,7 @@ opt_set MOTHERBOARD BOARD_RAMBO \ AXIS_RELATIVE_MODES '{ false, false, false }' \ BED_TRAMMING_LEVELING_ORDER '{ LF, RF }' \ X2_DRIVER_TYPE A4988 Y2_DRIVER_TYPE A4988 -opt_enable USE_XMAX_PLUG USE_YMAX_PLUG USE_ZMAX_PLUG \ - REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER REVERSE_ENCODER_DIRECTION SDSUPPORT EEPROM_SETTINGS \ +opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER REVERSE_ENCODER_DIRECTION SDSUPPORT EEPROM_SETTINGS \ S_CURVE_ACCELERATION X_DUAL_ENDSTOPS Y_DUAL_ENDSTOPS \ ADAPTIVE_STEP_SMOOTHING CNC_COORDINATE_SYSTEMS GCODE_MOTION_MODES \ LCD_BED_TRAMMING BED_TRAMMING_INCLUDE_CENTER @@ -115,7 +114,7 @@ opt_set MOTHERBOARD BOARD_RAMBO \ CONTROLLER_FAN_PIN X_MAX_PIN FILWIDTH_PIN 5 \ FAN_MIN_PWM 50 FAN_KICKSTART_TIME 100 \ XY_FREQUENCY_LIMIT 15 -opt_enable COREYX USE_XMAX_PLUG MIXING_EXTRUDER GRADIENT_MIX \ +opt_enable COREYX MIXING_EXTRUDER GRADIENT_MIX \ BABYSTEPPING BABYSTEP_XY BABYSTEP_DISPLAY_TOTAL FILAMENT_LCD_DISPLAY \ REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER MENU_ADDAUTOSTART SDSUPPORT SDCARD_SORT_ALPHA \ ENDSTOP_NOISE_THRESHOLD FAN_SOFT_PWM \ diff --git a/buildroot/tests/teensy31 b/buildroot/tests/teensy31 index 7465a67fdd..5f5b84e0c4 100755 --- a/buildroot/tests/teensy31 +++ b/buildroot/tests/teensy31 @@ -15,7 +15,6 @@ exec_test $1 $2 "Teensy3.1 with default config" "$3" # restore_configs opt_set MOTHERBOARD BOARD_TEENSY31_32 X_HOME_DIR 0 Y_HOME_DIR 0 Z_HOME_DIR 0 -opt_disable USE_XMIN_PLUG USE_YMIN_PLUG USE_ZMIN_PLUG exec_test $1 $2 "Teensy3.1 with Zero Endstops" "$3" # diff --git a/buildroot/tests/teensy35 b/buildroot/tests/teensy35 index fd6ae86387..38da97c25b 100755 --- a/buildroot/tests/teensy35 +++ b/buildroot/tests/teensy35 @@ -87,7 +87,7 @@ opt_set MOTHERBOARD BOARD_TEENSY35_36 \ X_DRIVER_TYPE TMC5160 Y_DRIVER_TYPE TMC5160 \ X_MIN_ENDSTOP_HIT_STATE LOW Y_MIN_ENDSTOP_HIT_STATE LOW \ X_CS_PIN 46 Y_CS_PIN 47 -opt_enable COREXY USE_ZMIN_PLUG MONITOR_DRIVER_STATUS SENSORLESS_HOMING +opt_enable COREXY MONITOR_DRIVER_STATUS SENSORLESS_HOMING exec_test $1 $2 "Teensy 3.5/3.6 COREXY" "$3" # @@ -103,7 +103,7 @@ exec_test $1 $2 "Teensy 3.5/3.6 COREXZ | BACKLASH" "$3" # restore_configs opt_set MOTHERBOARD BOARD_TEENSY35_36 Z_DRIVER_TYPE A4988 Z2_DRIVER_TYPE A4988 Z2_MIN_PIN 2 -opt_enable Z_MULTI_ENDSTOPS USE_XMAX_PLUG +opt_enable Z_MULTI_ENDSTOPS pins_set ramps/RAMPS X_MAX_PIN -1 exec_test $1 $2 "Dual Z with Dual Z endstops" "$3" diff --git a/buildroot/tests/teensy41 b/buildroot/tests/teensy41 index 11b5e34025..e6a769c282 100755 --- a/buildroot/tests/teensy41 +++ b/buildroot/tests/teensy41 @@ -90,7 +90,7 @@ opt_set MOTHERBOARD BOARD_TEENSY41 \ X_DRIVER_TYPE TMC5160 Y_DRIVER_TYPE TMC5160 \ X_MIN_ENDSTOP_HIT_STATE LOW Y_MIN_ENDSTOP_HIT_STATE LOW \ X_CS_PIN 46 Y_CS_PIN 47 -opt_enable COREXY USE_ZMIN_PLUG MONITOR_DRIVER_STATUS SENSORLESS_HOMING +opt_enable COREXY MONITOR_DRIVER_STATUS SENSORLESS_HOMING exec_test $1 $2 "Teensy 4.0/4.1 COREXY" "$3" # @@ -106,7 +106,7 @@ exec_test $1 $2 "Teensy 4.0/4.1 COREXZ" "$3" # restore_configs opt_set MOTHERBOARD BOARD_TEENSY41 Z_DRIVER_TYPE A4988 Z2_DRIVER_TYPE A4988 Z2_MIN_PIN 2 -opt_enable Z_MULTI_ENDSTOPS USE_XMAX_PLUG +opt_enable Z_MULTI_ENDSTOPS pins_set ramps/RAMPS X_MAX_PIN -1 exec_test $1 $2 "Dual Z with Dual Z endstops" "$3"