#define HEX__(n) 0x##n##LU
#define B8__(x) \
- (((x) & 0x0000000FLU)?(1<<0):0) \
- +(((x) & 0x000000F0LU)?(1<<1):0) \
- +(((x) & 0x00000F00LU)?(1<<2):0) \
- +(((x) & 0x0000F000LU)?(1<<3):0) \
- +(((x) & 0x000F0000LU)?(1<<4):0) \
- +(((x) & 0x00F00000LU)?(1<<5):0) \
- +(((x) & 0x0F000000LU)?(1<<6):0) \
- +(((x) & 0xF0000000LU)?(1<<7):0)
+ (((x) & 0x0000000FLU)?(1 << 0):0) \
+ +(((x) & 0x000000F0LU)?(1 << 1):0) \
+ +(((x) & 0x00000F00LU)?(1 << 2):0) \
+ +(((x) & 0x0000F000LU)?(1 << 3):0) \
+ +(((x) & 0x000F0000LU)?(1 << 4):0) \
+ +(((x) & 0x00F00000LU)?(1 << 5):0) \
+ +(((x) & 0x0F000000LU)?(1 << 6):0) \
+ +(((x) & 0xF0000000LU)?(1 << 7):0)
#define B8(bits,count) { ((uint8_t)B8__(HEX__(bits))), (count) }