summaryrefslogtreecommitdiff
path: root/switch.h
blob: eda94c28fc9c07c81a5f89fb5897a2d3268465de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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