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:
Scott Lahteine
2019-03-16 23:43:06 -05:00
committed by GitHub
parent d20eab4f83
commit 49cf92dc36
281 changed files with 1299 additions and 1288 deletions

View File

@@ -75,7 +75,7 @@
//
// LCD / Controller
//
#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
#if BOTH(ULTRA_LCD, NEWPANEL)
#undef BEEPER_PIN
#undef LCD_PINS_RS
@@ -154,7 +154,7 @@
#define SPINDLE_LASER_PWM_PIN 46 // MUST BE HARDWARE PWM
#define SPINDLE_LASER_ENABLE_PIN 62 // Pin should have a pullup!
#define SPINDLE_DIR_PIN 48
#elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)) // use expansion header if no LCD in use
#elif !BOTH(ULTRA_LCD, NEWPANEL) // use expansion header if no LCD in use
#define SPINDLE_LASER_ENABLE_PIN 16 // Pin should have a pullup/pulldown!
#define SPINDLE_DIR_PIN 17
#endif