File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ typedef struct usb_transfer_info {
5151 uint16_t length , max_pkt_size ;
5252 usb_transfer_status_t status : 8 ;
5353 uint8_t address : 7 , : 1 , endpoint : 4 ;
54- usb_transfer_type_t type : 3 ;
54+ uint8_t type : 3 ; /* usb_transfer_type_t */
5555 bool direction : 1 ;
5656} usb_transfer_info_t ;
5757
@@ -72,7 +72,7 @@ typedef struct usb_event {
7272 usb_progress_handler_t * progress_handler ;
7373 void * progress_context , * context ;
7474 bool host : 1 ;
75- usb_speed_t speed : 2 ;
75+ uint8_t speed : 2 ; /* usb_speed_t */
7676 usb_event_type_t type ;
7777 union {
7878 usb_init_info_t init ;
Original file line number Diff line number Diff line change @@ -114,16 +114,18 @@ struct hub {
114114 port_t ports [];
115115};
116116
117+ enum device_state {
118+ DEVICE_STATE_ATTACHED ,
119+ DEVICE_STATE_POWERED ,
120+ DEVICE_STATE_DEFAULT_OR_ADDRESS ,
121+ DEVICE_STATE_CONFIGURED ,
122+ };
123+
117124struct device {
118125 node_t node ;
119126 libusb_device_handle * handle ;
120127 endpoint_t endpoints [0x20 ];
121- enum device_state {
122- DEVICE_STATE_ATTACHED ,
123- DEVICE_STATE_POWERED ,
124- DEVICE_STATE_DEFAULT_OR_ADDRESS ,
125- DEVICE_STATE_CONFIGURED ,
126- } state : 2 ;
128+ uint8_t state : 2 ; /* enum device_state */
127129 uint8_t address : 7 , numPorts : 7 ;
128130 hub_t hub ;
129131};
You can’t perform that action at this time.
0 commit comments