Hi everyone,
I defined a variable via bit field way as follow:
typedef struct stAbbrTime_t
{
UINT32 Sec : 6;
UINT32 Min : 6;
UINT32 Hour : 5;
UINT32 Day : 5;
UINT32 Month : 4;
UINT32 Year : 6;
}ST_ABBR_TIME;
I think this variable must be 4 bytes length, but in fact it occupy 5 bytes as follow:
I don't know why.
The bit field settings in CW5.1 is as follow(I use the default setting)
Thank you.
Hi
Can you please upload your demo project? Thanks
BR
Jennie Zhang