keil中怎么用结构,联合定义位变量?我在ARM中这么定义正确吗?
typedef union _MAC_FRAME_CONTROL
{
WORD_VAL word;
struct _MAC_FRAME_CONTROL_bits
{
unsigned char FrameType :3;
unsigned char SecurityEnabled :1;
unsigned char FramePending :1;
unsigned char ACKRequest :1;
unsigned char IntraPAN :1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
unsigned char DstAddrMode :2;
unsigned char :1;
unsigned char :1;
unsigned char SrcAddrMode :2;
} bits;
} MAC_FRAME_CONTROL;
此帖出自
小平头技术问答
一周热门 更多>