ctr: Add support for multiple integers in DECL_CTR_INT
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -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...) \
|
||||
|
||||
Reference in New Issue
Block a user