You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

30 lines
619 B

#ifndef REGUTILS_H
#define REGUTILS_H
#include "Register.h"
#define ADD_UNSIGNED_FIELD(NAME, MASK) \
do { \
NAME = Field::fromMaskUnsigned(MASK); \
_fields.append(NAME); \
} while(0)
#define ADD_UNSIGNED_FIELD_LONG(NAME, MASK) \
do { \
NAME = Field::fromMaskUnsignedLong(MASK); \
_fields.append(NAME); \
} while(0)
#define ADD_SIGNED_FIELD(NAME, MASK) \
do { \
NAME = Field::fromMaskSigned(MASK); \
_fields.append(NAME); \
} while(0)
#define ADD_BIT_FIELD(NAME, MASK) \
do { \
NAME = Field::fromBitPosition(MASK); \
_fields.append(NAME); \
} while(0)
#endif //REGUTILS_H