-
Notifications
You must be signed in to change notification settings - Fork 1
/
usb_private.h
55 lines (53 loc) · 1.63 KB
/
usb_private.h
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
// Totally generic device descriptor
char device_descriptor[] = {
18,
1,
0x10,0x01,
0, 0, 0,
64,
0x09,0x12,
0x01,0x00,
0,1,
0,0,0,
1
};
// Describes a standard virtual COM port
char config_descriptor[] = {
/*Configuation Descriptor*/
0x09, /* bLength: Configuation Descriptor size */
2, /* bDescriptorType: Configuration */
9+9+7+7, /* wTotalLength:no of returned bytes */
0x00,
0x01, /* bNumInterfaces: 2 interface */
0x01, /* bConfigurationValue: Configuration value */
0x00, /* iConfiguration: Index of string descriptor describing the configuration */
0x80, /* bmAttributes: bus powered */
50, /* MaxPower 100 mA */
/*Interface Descriptor*/
0x09, /* bLength: Interface Descriptor size */
4, /* bDescriptorType: Interface */
/* Interface descriptor type */
0x00, /* bInterfaceNumber: Number of Interface */
0x00, /* bAlternateSetting: Alternate setting */
0x02, /* bNumEndpoints: Endpoints used */
0xff, /* bInterfaceClass: Custom */
0x00, /* bInterfaceSubClass: - */
0x00, /* bInterfaceProtocol: - */
0x00, /* iInterface: */
/*RX Endpoint Descriptor*/
0x07, /* bLength: Endpoint Descriptor size */
5, /* bDescriptorType: Endpoint */
0x01, /* bEndpointAddress: (OUT1) */
0x02, /* bmAttributes: Bulk */
64, /* wMaxPacketSize: */
0x00,
0x00, /* bInterval: */
/*TX Endpoint Descriptor*/
0x07, /* bLength: Endpoint Descriptor size */
5, /* bDescriptorType: Endpoint */
0x82, /* bEndpointAddress: (IN2) */
0x02, /* bmAttributes: Bulk */
64, /* wMaxPacketSize: */
0x00,
0x00, /* bInterval: */
};