From 39c109d8adf20c2ebc5ff5ad47349205c575759c Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sun, 30 Oct 2022 12:42:36 +1300 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=8C=20Remove=20unused=20RX/TX=20pins?= =?UTF-8?q?=20(#24932)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/pins_postprocess.h | 70 ++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/Marlin/src/pins/pins_postprocess.h b/Marlin/src/pins/pins_postprocess.h index c3c217557beb6..7656037f3da98 100644 --- a/Marlin/src/pins/pins_postprocess.h +++ b/Marlin/src/pins/pins_postprocess.h @@ -307,6 +307,76 @@ #define E7_CS_PIN -1 #endif +// +// Destroy stepper driver RX and TX pins when set to -1 +// +#if !PIN_EXISTS(Z2_SERIAL_TX) + #undef Z2_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(Z2_SERIAL_RX) + #undef Z2_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(Z3_SERIAL_TX) + #undef Z3_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(Z3_SERIAL_RX) + #undef Z3_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(Z4_SERIAL_TX) + #undef Z4_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(Z4_SERIAL_RX) + #undef Z4_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(X2_SERIAL_TX) + #undef X2_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(X2_SERIAL_RX) + #undef X2_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(Y2_SERIAL_TX) + #undef Y2_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(Y2_SERIAL_RX) + #undef Y2_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(I_SERIAL_TX) + #undef I_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(I_SERIAL_RX) + #undef I_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(J_SERIAL_TX) + #undef J_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(J_SERIAL_RX) + #undef J_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(K_SERIAL_TX) + #undef K_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(K_SERIAL_RX) + #undef K_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(U_SERIAL_TX) + #undef U_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(U_SERIAL_RX) + #undef U_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(V_SERIAL_TX) + #undef V_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(V_SERIAL_RX) + #undef V_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(W_SERIAL_TX) + #undef W_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(W_SERIAL_RX) + #undef W_SERIAL_RX_PIN +#endif + #ifndef FAN_PIN #define FAN_PIN -1 #endif