> 其他 >
union的定义
union //程序标志位
{
uint16 Register;
struct
{
uint8 bus_reset :1;
uint8 suspend :1;
uint8 remote_wakeup :1;
uint8 int_isr :1;
uint8 not_end :1;
uint8 usb_idle :1;
uint8 usb_busy :1;
uint8 setup_packet_in :1;
uint8 setup_packet_out :1;
uint8 set_addr :1;
uint8 usb_endp0_in :1;
uint8 usb_endp2_in :1;
uint8 usb_endp2_out :1;
}flags;
}usb_flags;
人气:465 ℃ 时间:2020-06-15 08:13:59
解答
这里的1意思是定义1个位的大小来存储1或0两中状态
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版