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:
Scott Lahteine 2018-04-28 10:09:14 -05:00
parent 683dc24e0f
commit d470a1234f

View File

@ -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')