Extended condition macros (#13419)
Allow `ENABLED`, `DISABLED`, `PIN_EXISTS`, and `BUTTON_EXISTS` to take multiple arguments. Also add: - Alias `ANY(...)` for `!DISABLED(...)` - Alias `ANY_PIN(...)` for `PIN_EXISTS(a) || PIN_EXISTS(b) ...` - Alias `EITHER(A,B)` for `ANY(...)` - Alias `ALL(...)` and `BOTH(A,B)` for `ENABLED(...)` - `NONE(...)` for `DISABLED(...)`
This commit is contained in:
@ -220,8 +220,7 @@
|
||||
#if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENABLE_PIN)
|
||||
#if NUM_SERVOS <= 1 // try to use servo connector first
|
||||
#define CASE_LIGHT_PIN 6 // MUST BE HARDWARE PWM
|
||||
#elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) \
|
||||
&& (ENABLED(PANEL_ONE) || ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(MINIPANEL) || ENABLED(REPRAPWORLD_KEYPAD))) // try to use AUX 2
|
||||
#elif !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD)) // try to use AUX 2
|
||||
#define CASE_LIGHT_PIN 44 // MUST BE HARDWARE PWM
|
||||
#endif
|
||||
#endif
|
||||
@ -234,8 +233,7 @@
|
||||
#define SPINDLE_LASER_ENABLE_PIN 4 // Pin should have a pullup/pulldown!
|
||||
#define SPINDLE_LASER_PWM_PIN 6 // MUST BE HARDWARE PWM
|
||||
#define SPINDLE_DIR_PIN 5
|
||||
#elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) \
|
||||
&& (ENABLED(PANEL_ONE) || ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(MINIPANEL) || ENABLED(REPRAPWORLD_KEYPAD))) // try to use AUX 2
|
||||
#elif !(BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD)) // try to use AUX 2
|
||||
#define SPINDLE_LASER_ENABLE_PIN 40 // Pin should have a pullup/pulldown!
|
||||
#define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM
|
||||
#define SPINDLE_DIR_PIN 65
|
||||
@ -335,7 +333,7 @@
|
||||
#define LCD_PINS_ENABLE 51 // SID (MOSI)
|
||||
#define LCD_PINS_D4 52 // SCK (CLK) clock
|
||||
|
||||
#elif ENABLED(NEWPANEL) && ENABLED(PANEL_ONE)
|
||||
#elif BOTH(NEWPANEL, PANEL_ONE)
|
||||
|
||||
#define LCD_PINS_RS 40
|
||||
#define LCD_PINS_ENABLE 42
|
||||
@ -367,7 +365,7 @@
|
||||
|
||||
#else
|
||||
|
||||
#if ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)
|
||||
#if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)
|
||||
#define LCD_PINS_DC 25 // Set as output on init
|
||||
#define LCD_PINS_RS 27 // Pull low for 1s to init
|
||||
// DOGM SPI LCD Support
|
||||
@ -451,7 +449,7 @@
|
||||
#define LCD_SDSS SDSS
|
||||
#define SD_DETECT_PIN 49
|
||||
|
||||
#elif ENABLED(VIKI2) || ENABLED(miniVIKI)
|
||||
#elif ANY(VIKI2, miniVIKI)
|
||||
|
||||
#define DOGLCD_CS 45
|
||||
#define DOGLCD_A0 44
|
||||
|
Reference in New Issue
Block a user