summaryrefslogtreecommitdiff
path: root/switch.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-05-30 15:50:44 +0200
committerFelix Fietkau <nbd@openwrt.org>2013-05-30 15:50:44 +0200
commit7fdfb969d521f5198345b675081aa220743de909 (patch)
tree6900ad92d3a75ae3db569af69761a01ff54ced96 /switch.h
parent63039a20e96c80ab20afca56d14d77af19eab270 (diff)
move some code to a separate source file
Diffstat (limited to 'switch.h')
-rw-r--r--switch.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/switch.h b/switch.h
new file mode 100644
index 0000000..eda94c2
--- /dev/null
+++ b/switch.h
@@ -0,0 +1,26 @@
+#ifndef __USBMODE_SWITCH_H
+#define __USBMODE_SWITCH_H
+
+#include <libubox/blobmsg.h>
+#include <libusb.h>
+
+struct usbdev_data {
+ struct libusb_device_descriptor desc;
+ libusb_device_handle *devh;
+ struct blob_attr *info;
+
+ char idstr[10];
+ char mfg[128], prod[128], serial[128];
+};
+
+enum {
+ DATA_MODE,
+ DATA_MSG,
+ DATA_MSG2,
+ DATA_MSG3,
+ __DATA_MAX
+};
+
+void handle_switch(struct usbdev_data *data);
+
+#endif