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 se
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/31 01:05:53
![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 se](/uploads/image/z/11808956-20-6.jpg?t=union%E7%9A%84%E5%AE%9A%E4%B9%89union+%2F%2F%E7%A8%8B%E5%BA%8F%E6%A0%87%E5%BF%97%E4%BD%8D%7Buint16+Register%3Bstruct+%7Buint8+bus_reset+%3A1%3Buint8+suspend+%3A1%3Buint8+remote_wakeup+%3A1%3Buint8+int_isr+%3A1%3Buint8+not_end+%3A1%3Buint8+usb_idle+%3A1%3Buint8+usb_busy+%3A1%3Buint8+setup_packet_in+%3A1%3Buint8+setup_packet_out+%3A1%3Buint8+se)
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 se
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;
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 se
这里的1意思是定义1个位的大小来存储1或0两中状态