From 84fd89b8cfb1c4f4bedd94d8f50ab402f878267a Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 22 Aug 2019 12:12:21 -0400 Subject: ctr: Add support for multiple integers in DECL_CTR_INT Signed-off-by: Kevin O'Connor --- src/command.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/command.h') 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...) \ -- cgit v1.2.3-70-g09d2