typedef struct
{
unsigned char Val1;
unsigned char Val2;
unsigned char Val3;
unsigned char ValArray1[2];
unsigned char ValArray2[2];
unsigned char ValArray3[2];
unsigned char Val4;
unsigned char Val5;
}s1;
From the above structure, would like to map only the Val3, ValArray1,ValArray2 and ValArray3 to series of bit values using ideas like structures/union. Meaning any changes to the values of Val3, ValArray1,ValArray2 and ValArray3, the bits changes on the fly.