Bläddra i källkod

Allow ENABLED(b) to work with "true" and "false"

Scott Lahteine 9 år sedan
förälder
incheckning
73a59a4e45
1 ändrade filer med 5 tillägg och 3 borttagningar
  1. 5
    3
      Marlin/macros.h

+ 5
- 3
Marlin/macros.h Visa fil

@@ -17,9 +17,11 @@
17 17
 
18 18
 // Macros to support option testing
19 19
 #define _CAT(a, ...) a ## __VA_ARGS__
20
-#define SWITCH_ENABLED_0 0
21
-#define SWITCH_ENABLED_1 1
22
-#define SWITCH_ENABLED_  1
20
+#define SWITCH_ENABLED_false 0
21
+#define SWITCH_ENABLED_true  1
22
+#define SWITCH_ENABLED_0     0
23
+#define SWITCH_ENABLED_1     1
24
+#define SWITCH_ENABLED_      1
23 25
 #define ENABLED(b) _CAT(SWITCH_ENABLED_, b)
24 26
 #define DISABLED(b) (!_CAT(SWITCH_ENABLED_, b))
25 27
 

Laddar…
Avbryt
Spara