在STM8 的触摸库中有如下定义,那引用TimerFlag_T定义时,变量大小是 8字节?还是1字节?
怎么没风过结构体中用":"的? 有没有人能解释一下?
/** Contains all timer flags */
typedef union
{
u8 whole;
struct
{
unsigned DTO_1sec : 1; /**< Detection Time Out (flag set every second) */
unsigned User_Start_100ms : 1; /**< From Customer Code to TSL */
unsigned User_Flag_100ms : 1; /**< From TSL to Customer Code */
unsigned RESERVED3 : 1;
unsigned RESERVED4 : 1;
unsigned RESERVED5 : 1;
unsigned RESERVED6 : 1;
unsigned RESERVED7 : 1;
} b;
} TimerFlag_T; |