瀏覽代碼

Fix ENABLED/DISABLED for DUE

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

This fixes issue #10550.
Scott Lahteine 7 年之前
父節點
當前提交
d470a1234f
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      Marlin/src/core/macros.h

+ 3
- 1
Marlin/src/core/macros.h 查看文件

@@ -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…
取消
儲存