X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=switch.h;h=e4993267bbe112773ad50bae47cc2ff8b0bb0363;hb=8a47c4b6649f8437bb60300471400d558426612e;hp=a6d5297deea3a296436874b3561cbaae558bf520;hpb=a63255ff23043196fce74f143a6ebc79184fcdf2;p=project%2Fusbmode.git diff --git a/switch.h b/switch.h index a6d5297..e499326 100644 --- a/switch.h +++ b/switch.h @@ -7,21 +7,24 @@ struct usbdev_data { struct libusb_device_descriptor desc; struct libusb_config_descriptor *config; + libusb_device *dev; libusb_device_handle *devh; struct blob_attr *info; int interface; + int msg_endpoint; + int response_endpoint; + int release_delay; + int dev_class; + bool need_response; char idstr[10]; char mfg[128], prod[128], serial[128]; }; -enum { - DATA_MODE, - DATA_MSG, - DATA_MSG2, - DATA_MSG3, - __DATA_MAX -}; +extern char **messages; +extern int *message_len; +extern int n_messages; +extern struct libusb_context *usb; void handle_switch(struct usbdev_data *data);