typedef union
{
  struct
  {
    int b0:1;   //use bitfields to access the bits
    int b1:1;
    int b2:1;
    int b3:1;
    int b4:1;
    int b5:1;
    int b6:1;
    int b7:1;
  } bits;       //in C99 it's allowed to leave this identifier out
  unsigned char byte;
} SfrByte;

SfrByte P0;

P0.byte = 0;    //access the whole byte
P0.bits.b0 = 0; //access bit0
P0.b1 = 0;      //access bit1 in C99 anonymous struct
