Pārlūkot izejas kodu

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

Scott Lahteine 9 gadus atpakaļ
vecāks
revīzija
73a59a4e45
1 mainītis faili ar 5 papildinājumiem un 3 dzēšanām
  1. 5
    3
      Marlin/macros.h

+ 5
- 3
Marlin/macros.h Parādīt failu

17
 
17
 
18
 // Macros to support option testing
18
 // Macros to support option testing
19
 #define _CAT(a, ...) a ## __VA_ARGS__
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
 #define ENABLED(b) _CAT(SWITCH_ENABLED_, b)
25
 #define ENABLED(b) _CAT(SWITCH_ENABLED_, b)
24
 #define DISABLED(b) (!_CAT(SWITCH_ENABLED_, b))
26
 #define DISABLED(b) (!_CAT(SWITCH_ENABLED_, b))
25
 
27
 

Notiek ielāde…
Atcelt
Saglabāt