typedef struct button {
uint16_t ticks;
uint8_t repeat : 4;
uint8_t event : 4;
uint8_t state : 3;
uint8_t debounce_cnt : 3;
uint8_t active_level : 1;
uint8_t button_level : 1;
uint8_t (*hal_button_Level)(void);
BtnCallback cb[number_of_event];
struct button* next;
}button;
看别人的程序,定义了一个结构体,里面:4或者:3是什么意思,求各路大神指点下。
|