-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathusb.h
More file actions
91 lines (79 loc) · 1.65 KB
/
usb.h
File metadata and controls
91 lines (79 loc) · 1.65 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#ifndef _USB_H
#define _USB_H
#include "short_types.h"
struct usb_endpoint {
struct list_head list;
char *bEndpointAddress;
char *bInterval;
char *bLength;
char *bmAttributes;
char *direction;
char *type;
char *wMaxPacketSize;
};
struct usb_config {
struct list_head list;
u8 bLength;
u8 bDescriptorType;
u16 wTotalLength;
u8 bNumInterfaces;
u8 bConfigurationValue;
u8 iConfiguration;
u8 bmAttributes;
u8 bMaxPower;
};
struct usb_interface {
struct list_head list;
struct list_head endpoints;
unsigned int configuration;
unsigned int ifnum;
char *sysname;
char *bAlternateSetting;
char *bInterfaceClass;
char *bInterfaceNumber;
char *bInterfaceProtocol;
char *bInterfaceSubClass;
char *bNumEndpoints;
char *name;
char *driver;
};
struct usb_device_qualifier {
char *bLength;
char *bDescriptorType;
char *bcdUSB;
char *bDeviceClass;
char *bDeviceSubClass;
char *bDeviceProtocol;
char *bMaxPacketSize0;
char *bNumConfigurations;
};
struct usb_device {
struct list_head list; /* connect devices independant of the bus */
struct list_head interfaces;
char *idProduct;
char *idVendor;
char *busnum;
char *devnum;
char *maxchild;
char *quirks;
char *speed;
char *version;
char *bConfigurationValue;
char *bDeviceClass;
char *bDeviceProtocol;
char *bDeviceSubClass;
char *bNumConfigurations;
char *bNumInterfaces;
char *bmAttributes;
char *bMaxPacketSize0;
char *bMaxPower;
char *manufacturer;
char *bcdDevice;
char *product;
char *serial;
struct usb_endpoint *ep0;
struct usb_device_qualifier *qualifier;
char *name;
char *driver; /* always "usb" but hey, it's nice to be complete */
};
#endif /* #define _USB_H */