move some code to a separate source file
[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 libusb_device_handle *devh;
10 struct blob_attr *info;
11
12 char idstr[10];
13 char mfg[128], prod[128], serial[128];
14 };
15
16 enum {
17 DATA_MODE,
18 DATA_MSG,
19 DATA_MSG2,
20 DATA_MSG3,
21 __DATA_MAX
22 };
23
24 void handle_switch(struct usbdev_data *data);
25
26 #endif