1*e42fb487SThu Nguyen #ifndef CPER_LIB_COMMON_UTILS_H 2*e42fb487SThu Nguyen #define CPER_LIB_COMMON_UTILS_H 3*e42fb487SThu Nguyen 4*e42fb487SThu Nguyen #include <libcper/BaseTypes.h> 5*e42fb487SThu Nguyen 6*e42fb487SThu Nguyen int bcd_to_int(UINT8 bcd); 7*e42fb487SThu Nguyen UINT8 int_to_bcd(int value); 8*e42fb487SThu Nguyen 9*e42fb487SThu Nguyen #if defined __has_attribute 10*e42fb487SThu Nguyen #if __has_attribute(counted_by) 11*e42fb487SThu Nguyen #define LIBCPER_CC_COUNTED_BY(x) __attribute__((counted_by(x))) 12*e42fb487SThu Nguyen #endif 13*e42fb487SThu Nguyen #endif 14*e42fb487SThu Nguyen 15*e42fb487SThu Nguyen #ifndef LIBCPER_CC_COUNTED_BY 16*e42fb487SThu Nguyen #define LIBCPER_CC_COUNTED_BY(x) 17*e42fb487SThu Nguyen #endif 18*e42fb487SThu Nguyen 19*e42fb487SThu Nguyen #endif 20