//********************************************************************************* union //程序标志位 { unsigned int Register; struct { unsigned char bus_reset :1; unsigned char suspend :1; unsigned char remote_wakeup :1; unsigned char int_isr :1; unsigned char not_end :1; unsigned char usb_idle :1; unsigned char usb_busy :1; unsigned char setup_packet_in :1; unsigned char setup_packet_out :1; unsigned char set_addr :1; unsigned char usb_endp0_in :1; unsigned char usb_endp2_in :1; unsigned char usb_endp2_out :1; }flags; }usb_flags; //**************************************************** union //中断寄存器 { unsigned char Register[2]; struct { unsigned char control_out_port :1; unsigned char control_in_port :1; unsigned char port_out_1 :1; unsigned char port_in_1 :1; unsigned char main_out_port :1; unsigned char main_in_port :1; unsigned char bus_reset :1; unsigned char suspend_change :1; unsigned char DMA_EOT :1; unsigned char not_use :7; }Interrupt; }Interrupt_Register; //**************************************************** |