From 76ec7040f1209ea9e0f0132782be62f3054601bb Mon Sep 17 00:00:00 2001 From: hannesweisbach Date: Thu, 6 May 2021 03:13:21 +0200 Subject: [PATCH] Allow undefined [XYZ]_ENABLE_PIN (for sensitive pins) (#21801) --- Marlin/src/pins/sensitive_pins.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/Marlin/src/pins/sensitive_pins.h b/Marlin/src/pins/sensitive_pins.h index b8be00bddd08..1c811601ca7b 100644 --- a/Marlin/src/pins/sensitive_pins.h +++ b/Marlin/src/pins/sensitive_pins.h @@ -55,8 +55,13 @@ #else #define _X_MS3 #endif +#if PIN_EXISTS(X_ENABLE) + #define _X_ENABLE_PIN X_ENABLE_PIN, +#else + #define _X_ENABLE_PIN +#endif -#define _X_PINS X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, _X_MIN _X_MAX _X_MS1 _X_MS2 _X_MS3 _X_CS +#define _X_PINS X_STEP_PIN, X_DIR_PIN, _X_ENABLE_PIN _X_MIN _X_MAX _X_MS1 _X_MS2 _X_MS3 _X_CS #if PIN_EXISTS(Y_MIN) #define _Y_MIN Y_MIN_PIN, @@ -88,8 +93,13 @@ #else #define _Y_MS3 #endif +#if PIN_EXISTS(Y_ENABLE) + #define _Y_ENABLE_PIN Y_ENABLE_PIN, +#else + #define _Y_ENABLE_PIN +#endif -#define _Y_PINS Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, _Y_MIN _Y_MAX _Y_MS1 _Y_MS2 _Y_MS3 _Y_CS +#define _Y_PINS Y_STEP_PIN, Y_DIR_PIN, _Y_ENABLE_PIN _Y_MIN _Y_MAX _Y_MS1 _Y_MS2 _Y_MS3 _Y_CS #if PIN_EXISTS(Z_MIN) #define _Z_MIN Z_MIN_PIN, @@ -121,8 +131,13 @@ #else #define _Z_MS3 #endif +#if PIN_EXISTS(Z_ENABLE) + #define _Z_ENABLE_PIN Z_ENABLE_PIN, +#else + #define _Z_ENABLE_PIN +#endif -#define _Z_PINS Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, _Z_MIN _Z_MAX _Z_MS1 _Z_MS2 _Z_MS3 _Z_CS +#define _Z_PINS Z_STEP_PIN, Z_DIR_PIN, _Z_ENABLE_PIN _Z_MIN _Z_MAX _Z_MS1 _Z_MS2 _Z_MS3 _Z_CS // // Extruder Chip Select, Digital Micro-steps