diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index b55c658024..f43ea40d5f 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -229,17 +229,14 @@ // Einstart OLED has Cardinal nav via pins defined in pins_EINSTART-S.h #if ENABLED(U8GLIB_SH1106_EINSTART) - #define ULTRA_LCD #define DOGLCD #define ULTIPANEL - #define NEWPANEL #endif /** * FSMC/SPI TFT PANELS */ #if ENABLED(MKS_ROBIN_TFT) - #define ULTRA_LCD #define DOGLCD #define ULTIPANEL #endif @@ -330,7 +327,7 @@ #endif #if ENABLED(ULTIPANEL) - #define NEWPANEL // Disable this if you actually have no click-encoder panel + #define NEWPANEL // Disable if there's actually no click-encoder panel #define ULTRA_LCD #endif diff --git a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h index 36277859b4..1fd8929716 100644 --- a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h +++ b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h @@ -221,9 +221,9 @@ #endif #if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENA_PIN) - #if NUM_SERVOS <= 1 // try to use servo connector first + #if NUM_SERVOS <= 1 // Prefer the servo connector #define CASE_LIGHT_PIN 6 // Hardware PWM - #elif !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD)) // try to use AUX 2 + #elif HAS_FREE_AUX2_PINS // try to use AUX 2 #define CASE_LIGHT_PIN 44 // Hardware PWM #endif #endif @@ -232,11 +232,11 @@ // M3/M4/M5 - Spindle/Laser Control // #if HAS_CUTTER && !PIN_EXISTS(SPINDLE_LASER_ENA) - #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // try to use servo connector first + #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // Prefer the servo connector #define SPINDLE_LASER_ENA_PIN 4 // Pullup or pulldown! #define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM #define SPINDLE_DIR_PIN 5 - #elif !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD)) // try to use AUX 2 + #elif HAS_FREE_AUX2_PINS // try to use AUX 2 #define SPINDLE_LASER_ENA_PIN 40 // Pullup or pulldown! #define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM #define SPINDLE_DIR_PIN 65 diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 5fdfd6a160..5e503cdac4 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -47,6 +47,8 @@ #define IS_RAMPS_SF #endif +#define HAS_FREE_AUX2_PINS !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD)) + // // RAMPS 1.3 / 1.4 - ATmega1280, ATmega2560 // @@ -1079,3 +1081,5 @@ #endif #endif #endif + +#undef HAS_FREE_AUX2_PINS diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index 754ddf8e2c..9853dc7010 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -258,12 +258,10 @@ #define PS_ON_PIN 12 #endif -#define AUX2_PINS_FREE !( BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD) ) - #if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENA_PIN) - #if NUM_SERVOS <= 1 // try to use servo connector first + #if NUM_SERVOS <= 1 // Prefer the servo connector #define CASE_LIGHT_PIN 6 // Hardware PWM - #elif AUX2_PINS_FREE + #elif HAS_FREE_AUX2_PINS #define CASE_LIGHT_PIN 44 // Hardware PWM #endif #endif @@ -276,7 +274,7 @@ #define SPINDLE_LASER_ENA_PIN 4 // Pullup or pulldown! #define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM #define SPINDLE_DIR_PIN 5 - #elif AUX2_PINS_FREE + #elif HAS_FREE_AUX2_PINS #define SPINDLE_LASER_ENA_PIN 40 // Pullup or pulldown! #define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM #define SPINDLE_DIR_PIN 65 @@ -285,8 +283,6 @@ #endif #endif -#undef AUX2_PINS_FREE - // // TMC software SPI // diff --git a/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h b/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h index 303c18cee4..45bad889ff 100644 --- a/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h +++ b/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h @@ -157,12 +157,10 @@ #define PS_ON_PIN 12 #endif -#define AUX2_PINS_FREE !( BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD) ) - #if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENA_PIN) - #if NUM_SERVOS <= 1 // try to use servo connector first + #if NUM_SERVOS <= 1 // Prefer the servo connector #define CASE_LIGHT_PIN 6 // Hardware PWM - #elif AUX2_PINS_FREE + #elif HAS_FREE_AUX2_PINS #define CASE_LIGHT_PIN 44 // Hardware PWM #endif #endif @@ -171,19 +169,17 @@ // M3/M4/M5 - Spindle/Laser Control // #if HAS_CUTTER && !PIN_EXISTS(SPINDLE_LASER_ENA) - #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // try to use servo connector first + #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // Prefer the servo connector #define SPINDLE_LASER_ENA_PIN 4 // Pullup or pulldown! #define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM #define SPINDLE_DIR_PIN 5 - #elif AUX2_PINS_FREE + #elif HAS_FREE_AUX2_PINS #define SPINDLE_LASER_ENA_PIN 40 // Pullup or pulldown! #define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM #define SPINDLE_DIR_PIN 65 #endif #endif -#undef AUX2_PINS_FREE - // // TMC software SPI //