diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-08-22 12:12:21 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2019-08-22 12:22:51 -0400 |
commit | 84fd89b8cfb1c4f4bedd94d8f50ab402f878267a (patch) | |
tree | 39b224f69c8676a7e2c369663be4a29b8d432afc /src/command.h | |
parent | 1b83fb72f5602ab0b050e2df14ed37a2463b53b7 (diff) | |
download | kutter-84fd89b8cfb1c4f4bedd94d8f50ab402f878267a.tar.gz kutter-84fd89b8cfb1c4f4bedd94d8f50ab402f878267a.tar.xz kutter-84fd89b8cfb1c4f4bedd94d8f50ab402f878267a.zip |
ctr: Add support for multiple integers in DECL_CTR_INT
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/command.h')
-rw-r--r-- | src/command.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/command.h b/src/command.h index 6cf2ca6b..1edf7c5a 100644 --- a/src/command.h +++ b/src/command.h @@ -16,17 +16,17 @@ #define HF_IN_SHUTDOWN 0x01 // Handler can run even when in emergency stop // Declare a constant exported to the host -#define DECL_CONSTANT(NAME, VALUE) \ - DECL_CTR_INT("_DECL_CONSTANT " NAME, (VALUE)) +#define DECL_CONSTANT(NAME, VALUE) \ + DECL_CTR_INT("_DECL_CONSTANT " NAME, 1, CTR_INT(VALUE)) #define DECL_CONSTANT_STR(NAME, VALUE) \ DECL_CTR("_DECL_CONSTANT_STR " NAME " " VALUE) // Declare an enumeration -#define DECL_ENUMERATION(ENUM, NAME, VALUE) \ - DECL_CTR_INT("_DECL_ENUMERATION " ENUM " " NAME, (VALUE)) +#define DECL_ENUMERATION(ENUM, NAME, VALUE) \ + DECL_CTR_INT("_DECL_ENUMERATION " ENUM " " NAME, 1, CTR_INT(VALUE)) #define DECL_ENUMERATION_RANGE(ENUM, NAME, VALUE, COUNT) \ DECL_CTR_INT("_DECL_ENUMERATION_RANGE " ENUM " " NAME \ - " " __stringify(COUNT), (VALUE)) + " " __stringify(COUNT), 1, CTR_INT(VALUE)) // Send an output message (and declare a static message type for it) #define output(FMT, args...) \ |