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

@ -267,7 +267,7 @@ class Stepper {
#if Z_MULTI_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN)
static bool locked_Z_motor, locked_Z2_motor;
#endif
#if ENABLED(Z_TRIPLE_ENDSTOPS) || (ENABLED(Z_STEPPER_AUTO_ALIGN) && ENABLED(Z_TRIPLE_STEPPER_DRIVERS))
#if ENABLED(Z_TRIPLE_ENDSTOPS) || BOTH(Z_STEPPER_AUTO_ALIGN, Z_TRIPLE_STEPPER_DRIVERS)
static bool locked_Z3_motor;
#endif
@ -423,7 +423,7 @@ class Stepper {
FORCE_INLINE static void set_z_lock(const bool state) { locked_Z_motor = state; }
FORCE_INLINE static void set_z2_lock(const bool state) { locked_Z2_motor = state; }
#endif
#if ENABLED(Z_TRIPLE_ENDSTOPS) || (ENABLED(Z_STEPPER_AUTO_ALIGN) && ENABLED(Z_TRIPLE_STEPPER_DRIVERS))
#if ENABLED(Z_TRIPLE_ENDSTOPS) || BOTH(Z_STEPPER_AUTO_ALIGN, Z_TRIPLE_STEPPER_DRIVERS)
FORCE_INLINE static void set_z3_lock(const bool state) { locked_Z3_motor = state; }
#endif