1 | /*
|
---|
2 | * Copyright (C) the Wine project
|
---|
3 | *
|
---|
4 | * This library is free software; you can redistribute it and/or
|
---|
5 | * modify it under the terms of the GNU Lesser General Public
|
---|
6 | * License as published by the Free Software Foundation; either
|
---|
7 | * version 2.1 of the License, or (at your option) any later version.
|
---|
8 | *
|
---|
9 | * This library is distributed in the hope that it will be useful,
|
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
12 | * Lesser General Public License for more details.
|
---|
13 | *
|
---|
14 | * You should have received a copy of the GNU Lesser General Public
|
---|
15 | * License along with this library; if not, write to the Free Software
|
---|
16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
17 | */
|
---|
18 |
|
---|
19 | #ifndef __DDK_USB100_H__
|
---|
20 | #define __DDK_USB100_H__
|
---|
21 |
|
---|
22 | #define USB_DEVICE_DESCRIPTOR_TYPE 0x01
|
---|
23 | #define USB_CONFIGURATION_DESCRIPTOR_TYPE 0x02
|
---|
24 | #define USB_STRING_DESCRIPTOR_TYPE 0x03
|
---|
25 | #define USB_INTERFACE_DESCRIPTOR_TYPE 0x04
|
---|
26 | #define USB_ENDPOINT_DESCRIPTOR_TYPE 0x05
|
---|
27 | #define USB_RESERVED_DESCRIPTOR_TYPE 0x06
|
---|
28 | #define USB_CONFIG_POWER_DESCRIPTOR_TYPE 0x07
|
---|
29 | #define USB_INTERFACE_POWER_DESCRIPTOR_TYPE 0x08
|
---|
30 |
|
---|
31 | #include <pshpack1.h>
|
---|
32 |
|
---|
33 | typedef struct _USB_DEVICE_DESCRIPTOR {
|
---|
34 | UCHAR bLength;
|
---|
35 | UCHAR bDescriptorType;
|
---|
36 | USHORT bcdUSB;
|
---|
37 | UCHAR bDeviceClass;
|
---|
38 | UCHAR bDeviceSubClass;
|
---|
39 | UCHAR bDeviceProtocol;
|
---|
40 | UCHAR bMaxPacketSize0;
|
---|
41 | USHORT idVendor;
|
---|
42 | USHORT idProduct;
|
---|
43 | USHORT bcdDevice;
|
---|
44 | UCHAR iManufacturer;
|
---|
45 | UCHAR iProduct;
|
---|
46 | UCHAR iSerialNumber;
|
---|
47 | UCHAR bNumConfigurations;
|
---|
48 | } USB_DEVICE_DESCRIPTOR;
|
---|
49 | typedef struct _USB_DEVICE_DESCRIPTOR *PUSB_DEVICE_DESCRIPTOR;
|
---|
50 |
|
---|
51 | #define USB_ENDPOINT_TYPE_MASK 0x03
|
---|
52 | #define USB_ENDPOINT_TYPE_CONTROL 0x00
|
---|
53 | #define USB_ENDPOINT_TYPE_ISOCHRONOUS 0x01
|
---|
54 | #define USB_ENDPOINT_TYPE_BULK 0x02
|
---|
55 | #define USB_ENDPOINT_TYPE_INTERRUPT 0x03
|
---|
56 |
|
---|
57 | typedef struct _USB_ENDPOINT_DESCRIPTOR {
|
---|
58 | UCHAR bLength;
|
---|
59 | UCHAR bDescriptorType;
|
---|
60 | UCHAR bEndpointAddress;
|
---|
61 | UCHAR bmAttributes;
|
---|
62 | USHORT wMaxPacketSize;
|
---|
63 | UCHAR bInterval;
|
---|
64 | } USB_ENDPOINT_DESCRIPTOR;
|
---|
65 | typedef struct _USB_ENDPOINT_DESCRIPTOR *PUSB_ENDPOINT_DESCRIPTOR;
|
---|
66 |
|
---|
67 | typedef struct _USB_CONFIGURATION_DESCRIPTOR {
|
---|
68 | UCHAR bLength;
|
---|
69 | UCHAR bDescriptorType;
|
---|
70 | USHORT wTotalLength;
|
---|
71 | UCHAR bNumInterfaces;
|
---|
72 | UCHAR bConfigurationValue;
|
---|
73 | UCHAR iConfiguration;
|
---|
74 | UCHAR bmAttributes;
|
---|
75 | UCHAR MaxPower;
|
---|
76 | } USB_CONFIGURATION_DESCRIPTOR;
|
---|
77 | typedef struct _USB_CONFIGURATION_DESCRIPTOR *PUSB_CONFIGURATION_DESCRIPTOR;
|
---|
78 |
|
---|
79 | typedef struct _USB_INTERFACE_DESCRIPTOR {
|
---|
80 | UCHAR bLength;
|
---|
81 | UCHAR bDescriptorType;
|
---|
82 | UCHAR bInterfaceNumber;
|
---|
83 | UCHAR bAlternateSetting;
|
---|
84 | UCHAR bNumEndpoints;
|
---|
85 | UCHAR bInterfaceClass;
|
---|
86 | UCHAR bInterfaceSubClass;
|
---|
87 | UCHAR bInterfaceProtocol;
|
---|
88 | UCHAR iInterface;
|
---|
89 | } USB_INTERFACE_DESCRIPTOR;
|
---|
90 | typedef struct _USB_INTERFACE_DESCRIPTOR *PUSB_INTERFACE_DESCRIPTOR;
|
---|
91 |
|
---|
92 | typedef struct _USB_STRING_DESCRIPTOR {
|
---|
93 | UCHAR bLength;
|
---|
94 | UCHAR bDescriptorType;
|
---|
95 | WCHAR bString[1];
|
---|
96 | } USB_STRING_DESCRIPTOR;
|
---|
97 | typedef struct _USB_STRING_DESCRIPTOR *PUSB_STRING_DESCRIPTOR;
|
---|
98 |
|
---|
99 | typedef struct _USB_COMMON_DESCRIPTOR {
|
---|
100 | UCHAR bLength;
|
---|
101 | UCHAR bDescriptorType;
|
---|
102 | } USB_COMMON_DESCRIPTOR;
|
---|
103 | typedef struct _USB_COMMON_DESCRIPTOR *PUSB_COMMON_DESCRIPTOR;
|
---|
104 |
|
---|
105 | typedef struct _USB_HUB_DESCRIPTOR {
|
---|
106 | UCHAR bDescriptorLength;
|
---|
107 | UCHAR bDescriptorType;
|
---|
108 | UCHAR bNumberOfPorts;
|
---|
109 | USHORT wHubCharacteristics;
|
---|
110 | UCHAR bPowerOnToPowerGood;
|
---|
111 | UCHAR bHubControlCurrent;
|
---|
112 | UCHAR bRemoveAndPowerMask[64];
|
---|
113 | } USB_HUB_DESCRIPTOR;
|
---|
114 | typedef struct _USB_HUB_DESCRIPTOR *PUSB_HUB_DESCRIPTOR;
|
---|
115 |
|
---|
116 | #include <poppack.h>
|
---|
117 |
|
---|
118 | #endif
|
---|