I had a question about the bit order in bit data structure for F28069 platform.
F28069 is little endian MCU, I thought the bit order starts from the bottom of the structure, such as
struct tXclkBitsStruct
{
Uint16 Rsvd1 :9; //bit[15:7]. reserved
Uint16 XCLKINSEL :1; //bit[6], XCLKIN Source Select
Uint16 Rsvd2 :4; //bit[5:2]. Reserved
Uint16 XCLKOUTDIV :2; //bit[1:0]. XCLKOUT Divide Ration
};
However, TI's example shows the opposite, i.e, bit 0 starts on the top, as shown below
struct XCLK_BIT
{
Uint16 XCLKOUTDIV :2; //bit[1:0]. XCLKOUT Divide Ratio
Uint16 rsvd1 :4; //bit[5:2]. reserved
Uint16 XCLKINSEL :1; //bit[6], XCLKOUT source select
Uint16 rsvd2 :9; //bit[15:7], reserved
};
I want to define the bit structure for my data variables and union the bit structure with a Uint16 word.
So what determines the bit order from bottom or top? Is it documented in C compiler manual or somewhere else?
Please advise.
Thanks a lot!