mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 12:04:19 +00:00
Fix ENABLED/DISABLED for DUE
…and any other platforms where `false`/`true` are defined as `0x0`/`0x1`. This fixes issue #10550.
This commit is contained in:
parent
683dc24e0f
commit
d470a1234f
@ -147,9 +147,11 @@
|
||||
#define SWITCH_ENABLED_true 1
|
||||
#define SWITCH_ENABLED_0 0
|
||||
#define SWITCH_ENABLED_1 1
|
||||
#define SWITCH_ENABLED_0x0 0
|
||||
#define SWITCH_ENABLED_0x1 1
|
||||
#define SWITCH_ENABLED_ 1
|
||||
#define ENABLED(b) _CAT(SWITCH_ENABLED_, b)
|
||||
#define DISABLED(b) (!_CAT(SWITCH_ENABLED_, b))
|
||||
#define DISABLED(b) !ENABLED(b)
|
||||
|
||||
#define WITHIN(V,L,H) ((V) >= (L) && (V) <= (H))
|
||||
#define NUMERIC(a) WITHIN(a, '0', '9')
|
||||
|
Loading…
Reference in New Issue
Block a user