a6d5297deea3a296436874b3561cbaae558bf520
[project/usbmode.git] / switch.h
1 #ifndef __USBMODE_SWITCH_H
2 #define __USBMODE_SWITCH_H
3
4 #include <libubox/blobmsg.h>
5 #include <libusb.h>
6
7 struct usbdev_data {
8         struct libusb_device_descriptor desc;
9         struct libusb_config_descriptor *config;
10         libusb_device_handle *devh;
11         struct blob_attr *info;
12         int interface;
13
14         char idstr[10];
15         char mfg[128], prod[128], serial[128];
16 };
17
18 enum {
19         DATA_MODE,
20         DATA_MSG,
21         DATA_MSG2,
22         DATA_MSG3,
23         __DATA_MAX
24 };
25
26 void handle_switch(struct usbdev_data *data);
27
28 #endif