ソースを参照

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
 #define SWITCH_ENABLED_true  1
147
 #define SWITCH_ENABLED_true  1
148
 #define SWITCH_ENABLED_0     0
148
 #define SWITCH_ENABLED_0     0
149
 #define SWITCH_ENABLED_1     1
149
 #define SWITCH_ENABLED_1     1
150
+#define SWITCH_ENABLED_0x0   0
151
+#define SWITCH_ENABLED_0x1   1
150
 #define SWITCH_ENABLED_      1
152
 #define SWITCH_ENABLED_      1
151
 #define ENABLED(b) _CAT(SWITCH_ENABLED_, b)
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
 #define WITHIN(V,L,H) ((V) >= (L) && (V) <= (H))
156
 #define WITHIN(V,L,H) ((V) >= (L) && (V) <= (H))
155
 #define NUMERIC(a) WITHIN(a, '0', '9')
157
 #define NUMERIC(a) WITHIN(a, '0', '9')

読み込み中…
キャンセル
保存