[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bluetooth-dev] Issues with structres

Hello All,
	I was breezing through the bluetooth stack source code and had a

 In hci.c line no: 246 cmd_pkt is defined as 

typedef struct cmd_pkt {
	  u32 type:8;
        u32 ocf:10;
        u32 ogf:6;
        u32 len:8;
        u8 data[256];
} cmd_pkt;

Same is repeated with event_struct (line 324)

What is the logic in coding u32 type:8? Wouldn't a u8 suffice in this case
or is there some greating meaning.

The problem I face is I am porting it a word aligned compiler.

Deepu Chandy Thomas