Hello,
I am working with TMS570 controller with TI ARM Compiler V5.1.6.
I have to initialize a union which is as below.
===========================================================
union
{
struct
{
bitfield bit1:1;
bitfield bit2:1;
............
}Bits;
u16 word;
}uniontype;
======================================================
Now, is it possible to initialize all the elements of the above union object to zero as below.
uniontype myunion = {0};
As per my knowledge, this type of initialization is allowed in C99. Is the TI compiler version given above supports this?
If not propose me a simple way to initialize the local structure/union objects to zero.
Thanking you
Regards
Giri Chavana