typedef union
{
unsigned char byte;
struct
{
unsigned char error_code : 3;
unsigned char command : 2;
unsigned char enable : 1;
unsigned char error : 1;
unsigned char ready : 1;
}bits;
}register_type
...
registerType *pReg = (registerType*)0x00004000; // XXX_REGISTER_MEMORY
pReg->bits.enable = 0;
pReg->bits.error_code = 7;
...
pReg->byte = 0x55