Browse Source

Fix ENABLED/DISABLED for DUE

…and any other platforms where `false`/`true` are defined as `0x0`/`0x1`.

This fixes issue #10550.
Scott Lahteine 7 years ago
parent
commit
d470a1234f
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      Marlin/src/core/macros.h

+ 3
- 1
Marlin/src/core/macros.h View File

@@ -147,9 +147,11 @@
147 147
 #define SWITCH_ENABLED_true  1
148 148
 #define SWITCH_ENABLED_0     0
149 149
 #define SWITCH_ENABLED_1     1
150
+#define SWITCH_ENABLED_0x0   0
151
+#define SWITCH_ENABLED_0x1   1
150 152
 #define SWITCH_ENABLED_      1
151 153
 #define ENABLED(b) _CAT(SWITCH_ENABLED_, b)
152
-#define DISABLED(b) (!_CAT(SWITCH_ENABLED_, b))
154
+#define DISABLED(b) !ENABLED(b)
153 155
 
154 156
 #define WITHIN(V,L,H) ((V) >= (L) && (V) <= (H))
155 157
 #define NUMERIC(a) WITHIN(a, '0', '9')

Loading…
Cancel
Save