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 | /*
|
---|
20 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
21 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
22 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
23 | * a choice of LGPL license versions is made available with the language indicating
|
---|
24 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
25 | * of the LGPL is applied is otherwise unspecified.
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef __DDK_USB100_H__
|
---|
29 | #define __DDK_USB100_H__
|
---|
30 |
|
---|
31 | #define USB_DEVICE_DESCRIPTOR_TYPE 0x01
|
---|
32 | #define USB_CONFIGURATION_DESCRIPTOR_TYPE 0x02
|
---|
33 | #define USB_STRING_DESCRIPTOR_TYPE 0x03
|
---|
34 | #define USB_INTERFACE_DESCRIPTOR_TYPE 0x04
|
---|
35 | #define USB_ENDPOINT_DESCRIPTOR_TYPE 0x05
|
---|
36 | #define USB_RESERVED_DESCRIPTOR_TYPE 0x06
|
---|
37 | #define USB_CONFIG_POWER_DESCRIPTOR_TYPE 0x07
|
---|
38 | #define USB_INTERFACE_POWER_DESCRIPTOR_TYPE 0x08
|
---|
39 |
|
---|
40 | #include <pshpack1.h>
|
---|
41 |
|
---|
42 | typedef struct _USB_DEVICE_DESCRIPTOR {
|
---|
43 | UCHAR bLength;
|
---|
44 | UCHAR bDescriptorType;
|
---|
45 | USHORT bcdUSB;
|
---|
46 | UCHAR bDeviceClass;
|
---|
47 | UCHAR bDeviceSubClass;
|
---|
48 | UCHAR bDeviceProtocol;
|
---|
49 | UCHAR bMaxPacketSize0;
|
---|
50 | USHORT idVendor;
|
---|
51 | USHORT idProduct;
|
---|
52 | USHORT bcdDevice;
|
---|
53 | UCHAR iManufacturer;
|
---|
54 | UCHAR iProduct;
|
---|
55 | UCHAR iSerialNumber;
|
---|
56 | UCHAR bNumConfigurations;
|
---|
57 | } USB_DEVICE_DESCRIPTOR;
|
---|
58 | typedef struct _USB_DEVICE_DESCRIPTOR *PUSB_DEVICE_DESCRIPTOR;
|
---|
59 |
|
---|
60 | #define USB_ENDPOINT_TYPE_MASK 0x03
|
---|
61 | #define USB_ENDPOINT_TYPE_CONTROL 0x00
|
---|
62 | #define USB_ENDPOINT_TYPE_ISOCHRONOUS 0x01
|
---|
63 | #define USB_ENDPOINT_TYPE_BULK 0x02
|
---|
64 | #define USB_ENDPOINT_TYPE_INTERRUPT 0x03
|
---|
65 |
|
---|
66 | typedef struct _USB_ENDPOINT_DESCRIPTOR {
|
---|
67 | UCHAR bLength;
|
---|
68 | UCHAR bDescriptorType;
|
---|
69 | UCHAR bEndpointAddress;
|
---|
70 | UCHAR bmAttributes;
|
---|
71 | USHORT wMaxPacketSize;
|
---|
72 | UCHAR bInterval;
|
---|
73 | } USB_ENDPOINT_DESCRIPTOR;
|
---|
74 | typedef struct _USB_ENDPOINT_DESCRIPTOR *PUSB_ENDPOINT_DESCRIPTOR;
|
---|
75 |
|
---|
76 | typedef struct _USB_CONFIGURATION_DESCRIPTOR {
|
---|
77 | UCHAR bLength;
|
---|
78 | UCHAR bDescriptorType;
|
---|
79 | USHORT wTotalLength;
|
---|
80 | UCHAR bNumInterfaces;
|
---|
81 | UCHAR bConfigurationValue;
|
---|
82 | UCHAR iConfiguration;
|
---|
83 | UCHAR bmAttributes;
|
---|
84 | UCHAR MaxPower;
|
---|
85 | } USB_CONFIGURATION_DESCRIPTOR;
|
---|
86 | typedef struct _USB_CONFIGURATION_DESCRIPTOR *PUSB_CONFIGURATION_DESCRIPTOR;
|
---|
87 |
|
---|
88 | typedef struct _USB_INTERFACE_DESCRIPTOR {
|
---|
89 | UCHAR bLength;
|
---|
90 | UCHAR bDescriptorType;
|
---|
91 | UCHAR bInterfaceNumber;
|
---|
92 | UCHAR bAlternateSetting;
|
---|
93 | UCHAR bNumEndpoints;
|
---|
94 | UCHAR bInterfaceClass;
|
---|
95 | UCHAR bInterfaceSubClass;
|
---|
96 | UCHAR bInterfaceProtocol;
|
---|
97 | UCHAR iInterface;
|
---|
98 | } USB_INTERFACE_DESCRIPTOR;
|
---|
99 | typedef struct _USB_INTERFACE_DESCRIPTOR *PUSB_INTERFACE_DESCRIPTOR;
|
---|
100 |
|
---|
101 | typedef struct _USB_STRING_DESCRIPTOR {
|
---|
102 | UCHAR bLength;
|
---|
103 | UCHAR bDescriptorType;
|
---|
104 | WCHAR bString[1];
|
---|
105 | } USB_STRING_DESCRIPTOR;
|
---|
106 | typedef struct _USB_STRING_DESCRIPTOR *PUSB_STRING_DESCRIPTOR;
|
---|
107 |
|
---|
108 | typedef struct _USB_COMMON_DESCRIPTOR {
|
---|
109 | UCHAR bLength;
|
---|
110 | UCHAR bDescriptorType;
|
---|
111 | } USB_COMMON_DESCRIPTOR;
|
---|
112 | typedef struct _USB_COMMON_DESCRIPTOR *PUSB_COMMON_DESCRIPTOR;
|
---|
113 |
|
---|
114 | #include <poppack.h>
|
---|
115 |
|
---|
116 | #endif
|
---|