Part Number: TMS320F28335
Tool/software: Code Composer Studio
Hi,
I would like to know if it is possible to Initialize each bit of the following Union/Structure using #define INIT_XB
struct X_BITS {
Uint16 a1:1;
Uint16 a2:1;
Uint16 a3:1;
Uint16 a4:1;
Uint16 a5:1;
Uint16 a6:1;
Uint16 a7:1;
Uint16 a8:1;
Uint16 a9:1;
Uint16 a10:1;
Uint16 a11:1;
Uint16 a12:1;
Uint16 a13:1;
Uint16 a14:1;
Uint16 a15:1;
Uint16 a16:1;
};
typedef union X_B{
Uint16 all;
struct X_BITS;
} regXB;
#define INIT_XB = {1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0}
...is it possible to do it at compile time?
regXB rXB = INIT_XB;
Regards,
Thanks, Jorge