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/05/06 19:53:11
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 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两中状态