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_USB_H__
|
---|
29 | #define __DDK_USB_H__
|
---|
30 |
|
---|
31 | #include <ddk/usb200.h>
|
---|
32 |
|
---|
33 | #define URB_FUNCTION_SELECT_CONFIGURATION 0x0000
|
---|
34 | #define URB_FUNCTION_SELECT_INTERFACE 0x0001
|
---|
35 | #define URB_FUNCTION_ABORT_PIPE 0x0002
|
---|
36 | #define URB_FUNCTION_TAKE_FRAME_LENGTH_CONTROL 0x0003
|
---|
37 | #define URB_FUNCTION_RELEASE_FRAME_LENGTH_CONTROL 0x0004
|
---|
38 | #define URB_FUNCTION_GET_FRAME_LENGTH 0x0005
|
---|
39 | #define URB_FUNCTION_SET_FRAME_LENGTH 0x0006
|
---|
40 | #define URB_FUNCTION_GET_CURRENT_FRAME_NUMBER 0x0007
|
---|
41 | #define URB_FUNCTION_CONTROL_TRANSFER 0x0008
|
---|
42 | #define URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER 0x0009
|
---|
43 | #define URB_FUNCTION_ISOCH_TRANSFER 0x000A
|
---|
44 | #define URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE 0x000B
|
---|
45 | #define URB_FUNCTION_SET_DESCRIPTOR_TO_DEVICE 0x000C
|
---|
46 | #define URB_FUNCTION_SET_FEATURE_TO_DEVICE 0x000D
|
---|
47 | #define URB_FUNCTION_SET_FEATURE_TO_INTERFACE 0x000E
|
---|
48 | #define URB_FUNCTION_SET_FEATURE_TO_ENDPOINT 0x000F
|
---|
49 | #define URB_FUNCTION_CLEAR_FEATURE_TO_DEVICE 0x0010
|
---|
50 | #define URB_FUNCTION_CLEAR_FEATURE_TO_INTERFACE 0x0011
|
---|
51 | #define URB_FUNCTION_CLEAR_FEATURE_TO_ENDPOINT 0x0012
|
---|
52 | #define URB_FUNCTION_GET_STATUS_FROM_DEVICE 0x0013
|
---|
53 | #define URB_FUNCTION_GET_STATUS_FROM_INTERFACE 0x0014
|
---|
54 | #define URB_FUNCTION_GET_STATUS_FROM_ENDPOINT 0x0015
|
---|
55 | #define URB_FUNCTION_RESERVED_0X0016 0x0016
|
---|
56 | #define URB_FUNCTION_VENDOR_DEVICE 0x0017
|
---|
57 | #define URB_FUNCTION_VENDOR_INTERFACE 0x0018
|
---|
58 | #define URB_FUNCTION_VENDOR_ENDPOINT 0x0019
|
---|
59 | #define URB_FUNCTION_CLASS_DEVICE 0x001A
|
---|
60 | #define URB_FUNCTION_CLASS_INTERFACE 0x001B
|
---|
61 | #define URB_FUNCTION_CLASS_ENDPOINT 0x001C
|
---|
62 | #define URB_FUNCTION_RESERVE_0X001D 0x001D
|
---|
63 | #define URB_FUNCTION_SYNC_RESET_PIPE_AND_CLEAR_STALL 0x001E
|
---|
64 | #define URB_FUNCTION_CLASS_OTHER 0x001F
|
---|
65 | #define URB_FUNCTION_VENDOR_OTHER 0x0020
|
---|
66 | #define URB_FUNCTION_GET_STATUS_FROM_OTHER 0x0021
|
---|
67 | #define URB_FUNCTION_CLEAR_FEATURE_TO_OTHER 0x0022
|
---|
68 | #define URB_FUNCTION_SET_FEATURE_TO_OTHER 0x0023
|
---|
69 | #define URB_FUNCTION_GET_DESCRIPTOR_FROM_ENDPOINT 0x0024
|
---|
70 | #define URB_FUNCTION_SET_DESCRIPTOR_TO_ENDPOINT 0x0025
|
---|
71 | #define URB_FUNCTION_GET_CONFIGURATION 0x0026
|
---|
72 | #define URB_FUNCTION_GET_INTERFACE 0x0027
|
---|
73 | #define URB_FUNCTION_GET_DESCRIPTOR_FROM_INTERFACE 0x0028
|
---|
74 | #define URB_FUNCTION_SET_DESCRIPTOR_TO_INTERFACE 0x0029
|
---|
75 | #define URB_FUNCTION_GET_MS_FEATURE_DESCRIPTOR 0x002A
|
---|
76 | #define URB_FUNCTION_RESERVE_0X002B 0x002B
|
---|
77 | #define URB_FUNCTION_RESERVE_0X002C 0x002C
|
---|
78 | #define URB_FUNCTION_RESERVE_0X002D 0x002D
|
---|
79 | #define URB_FUNCTION_RESERVE_0X002E 0x002E
|
---|
80 | #define URB_FUNCTION_RESERVE_0X002F 0x002F
|
---|
81 | #define URB_FUNCTION_SYNC_RESET_PIPE 0x0030
|
---|
82 | #define URB_FUNCTION_SYNC_CLEAR_STALL 0x0031
|
---|
83 |
|
---|
84 | #define USBD_SHORT_TRANSFER_OK 0x00000002
|
---|
85 | #define USBD_TRANSFER_DIRECTION_OUT 0
|
---|
86 | #define USBD_TRANSFER_DIRECTION_IN 1
|
---|
87 |
|
---|
88 | typedef LONG USBD_STATUS;
|
---|
89 |
|
---|
90 | typedef PVOID USBD_PIPE_HANDLE;
|
---|
91 | typedef PVOID USBD_CONFIGURATION_HANDLE;
|
---|
92 | typedef PVOID USBD_INTERFACE_HANDLE;
|
---|
93 |
|
---|
94 | #define USBD_STATUS_SUCCESS ((USBD_STATUS)0x00000000)
|
---|
95 | #define USBD_STATUS_PENDING ((USBD_STATUS)0x40000000)
|
---|
96 | #define USBD_STATUS_ERROR ((USBD_STATUS)0x80000000)
|
---|
97 | #define USBD_STATUS_HALTED ((USBD_STATUS)0xC0000000)
|
---|
98 |
|
---|
99 | #define USBD_STATUS_CANCELED ((USBD_STATUS)0x00010000)
|
---|
100 | #define USBD_STATUS_CANCELING ((USBD_STATUS)0x00020000)
|
---|
101 | #define USBD_STATUS_CRC ((USBD_STATUS)0xC0000001)
|
---|
102 | #define USBD_STATUS_BTSTUFF ((USBD_STATUS)0xC0000002)
|
---|
103 | #define USBD_STATUS_DATA_TOGGLE_MISMATCH ((USBD_STATUS)0xC0000003)
|
---|
104 | #define USBD_STATUS_STALL_PID ((USBD_STATUS)0xC0000004)
|
---|
105 | #define USBD_STATUS_DEV_NOT_RESPONDING ((USBD_STATUS)0xC0000005)
|
---|
106 | #define USBD_STATUS_PID_CHECK_FAILURE ((USBD_STATUS)0xC0000006)
|
---|
107 | #define USBD_STATUS_UNEXPECTED_PID ((USBD_STATUS)0xC0000007)
|
---|
108 | #define USBD_STATUS_DATA_OVERRUN ((USBD_STATUS)0xC0000008)
|
---|
109 | #define USBD_STATUS_DATA_UNDERRUN ((USBD_STATUS)0xC0000009)
|
---|
110 | #define USBD_STATUS_RESERVED1 ((USBD_STATUS)0xC000000A)
|
---|
111 | #define USBD_STATUS_RESERVED2 ((USBD_STATUS)0xC000000B)
|
---|
112 | #define USBD_STATUS_BUFFER_OVERRUN ((USBD_STATUS)0xC000000C)
|
---|
113 | #define USBD_STATUS_BUFFER_UNDERRUN ((USBD_STATUS)0xC000000D)
|
---|
114 | #define USBD_STATUS_NOT_ACCESSED ((USBD_STATUS)0xC000000F)
|
---|
115 | #define USBD_STATUS_FIFO ((USBD_STATUS)0xC0000010)
|
---|
116 | #define USBD_STATUS_XACT_ERROR ((USBD_STATUS)0xC0000011)
|
---|
117 | #define USBD_STATUS_BABBLE_DETECTED ((USBD_STATUS)0xC0000012)
|
---|
118 | #define USBD_STATUS_DATA_BUFFER_ERROR ((USBD_STATUS)0xC0000013)
|
---|
119 | #define USBD_STATUS_ENDPOINT_HALTED ((USBD_STATUS)0xC0000030)
|
---|
120 | #define USBD_STATUS_NO_MEMORY ((USBD_STATUS)0x80000100)
|
---|
121 | #define USBD_STATUS_INVALID_URB_FUNCTION ((USBD_STATUS)0x80000200)
|
---|
122 | #define USBD_STATUS_INVALID_PARAMETER ((USBD_STATUS)0x80000300)
|
---|
123 | #define USBD_STATUS_ERROR_BUSY ((USBD_STATUS)0x80000400)
|
---|
124 | #define USBD_STATUS_REQUEST_FAILED ((USBD_STATUS)0x80000500)
|
---|
125 | #define USBD_STATUS_INVALID_PIPE_HANDLE ((USBD_STATUS)0x80000600)
|
---|
126 | #define USBD_STATUS_NO_BANDWIDTH ((USBD_STATUS)0x80000700)
|
---|
127 | #define USBD_STATUS_INTERNAL_HC_ERROR ((USBD_STATUS)0x80000800)
|
---|
128 | #define USBD_STATUS_ERROR_SHORT_TRANSFER ((USBD_STATUS)0x80000900)
|
---|
129 | #define USBD_STATUS_BAD_START_FRAME ((USBD_STATUS)0xC0000A00)
|
---|
130 | #define USBD_STATUS_ISOCH_REQUEST_FAILED ((USBD_STATUS)0xC0000B00)
|
---|
131 | #define USBD_STATUS_FRAME_CONTROL_OWNED ((USBD_STATUS)0xC0000C00)
|
---|
132 | #define USBD_STATUS_FRAME_CONTROL_NOT_OWNED ((USBD_STATUS)0xC0000D00)
|
---|
133 | #define USBD_STATUS_NOT_SUPPORTED ((USBD_STATUS)0xC0000E00)
|
---|
134 | #define USBD_STATUS_INVALID_CONFIGURATION_DESCRIPTOR ((USBD_STATUS)0xC0000F00)
|
---|
135 | #define USBD_STATUS_INSUFFICIENT_RESOURCES ((USBD_STATUS)0xC0001000)
|
---|
136 | #define USBD_STATUS_SET_CONFIG_FAILED ((USBD_STATUS)0xC0002000)
|
---|
137 | #define USBD_STATUS_BUFFER_TOO_SMALL ((USBD_STATUS)0xC0003000)
|
---|
138 | #define USBD_STATUS_INTERFACE_NOT_FOUND ((USBD_STATUS)0xC0004000)
|
---|
139 | #define USBD_STATUS_INVALID_PIPE_FLAGS ((USBD_STATUS)0xC0005000)
|
---|
140 | #define USBD_STATUS_TIMEOUT ((USBD_STATUS)0xC0006000)
|
---|
141 | #define USBD_STATUS_DEVICE_GONE ((USBD_STATUS)0xC0007000)
|
---|
142 | #define USBD_STATUS_STATUS_NOT_MAPPED ((USBD_STATUS)0xC0008000)
|
---|
143 | #define USBD_STATUS_ISO_NOT_ACCESSED_BY_HW ((USBD_STATUS)0xC0020000)
|
---|
144 | #define USBD_STATUS_ISO_TD_ERROR ((USBD_STATUS)0xC0030000)
|
---|
145 | #define USBD_STATUS_ISO_NA_LATE_USBPORT ((USBD_STATUS)0xC0040000)
|
---|
146 | #define USBD_STATUS_ISO_NOT_ACCESSED_LATE ((USBD_STATUS)0xC0050000)
|
---|
147 |
|
---|
148 | #define USBD_SUCCESS(Status) ((USBD_STATUS)(Status) >= 0)
|
---|
149 | #define USBD_PENDING(Status) ((ULONG)(Status) >> 30 == 1)
|
---|
150 | #define USBD_ERROR(Status) ((USBD_STATUS)(Status) < 0)
|
---|
151 |
|
---|
152 | typedef struct _USBD_VERSION_INFORMATION {
|
---|
153 | ULONG USBDI_Version;
|
---|
154 | ULONG Supported_USB_Version;
|
---|
155 | } USBD_VERSION_INFORMATION;
|
---|
156 | typedef struct _USBD_VERSION_INFORMATION *PUSBD_VERSION_INFORMATION;
|
---|
157 |
|
---|
158 | typedef enum _USBD_PIPE_TYPE {
|
---|
159 | UsbdPipeTypeControl,
|
---|
160 | UsbdPipeTypeIsochronous,
|
---|
161 | UsbdPipeTypeBulk,
|
---|
162 | UsbdPipeTypeInterrupt
|
---|
163 | } USBD_PIPE_TYPE;
|
---|
164 |
|
---|
165 | typedef struct _USBD_PIPE_INFORMATION {
|
---|
166 | USHORT MaximumPacketSize;
|
---|
167 | UCHAR EndpointAddress;
|
---|
168 | UCHAR Interval;
|
---|
169 | USBD_PIPE_TYPE PipeType;
|
---|
170 | USBD_PIPE_HANDLE PipeHandle;
|
---|
171 | ULONG MaximumTransferSize;
|
---|
172 | ULONG PipeFlags;
|
---|
173 | } USBD_PIPE_INFORMATION;
|
---|
174 | typedef struct _USBD_PIPE_INFORMATION *PUSBD_PIPE_INFORMATION;
|
---|
175 |
|
---|
176 | typedef struct _USBD_INTERFACE_INFORMATION {
|
---|
177 | USHORT Length;
|
---|
178 | UCHAR InterfaceNumber;
|
---|
179 | UCHAR AlternateSetting;
|
---|
180 | UCHAR Class;
|
---|
181 | UCHAR SubClass;
|
---|
182 | UCHAR Protocol;
|
---|
183 | UCHAR Reserved;
|
---|
184 | USBD_INTERFACE_HANDLE InterfaceHandle;
|
---|
185 | ULONG NumberOfPipes;
|
---|
186 | USBD_PIPE_INFORMATION Pipes[1];
|
---|
187 | } USBD_INTERFACE_INFORMATION;
|
---|
188 | typedef struct _USBD_INTERFACE_INFORMATION *PUSBD_INTERFACE_INFORMATION;
|
---|
189 |
|
---|
190 | typedef struct _USBD_ISO_PACKET_DESCRIPTOR {
|
---|
191 | ULONG Offset;
|
---|
192 | ULONG Length;
|
---|
193 | USBD_STATUS Status;
|
---|
194 | } USBD_ISO_PACKET_DESCRIPTOR;
|
---|
195 | typedef struct _USBD_ISO_PACKET_DESCRIPTOR *PUSBD_ISO_PACKET_DESCRIPTOR;
|
---|
196 |
|
---|
197 | struct _URB_HCD_AREA {
|
---|
198 | PVOID Reserved8[8];
|
---|
199 | };
|
---|
200 |
|
---|
201 | struct _URB_HEADER {
|
---|
202 | USHORT Length;
|
---|
203 | USHORT Function;
|
---|
204 | USBD_STATUS Status;
|
---|
205 | PVOID UsbdDeviceHandle;
|
---|
206 | ULONG UsbdFlags;
|
---|
207 | };
|
---|
208 |
|
---|
209 | struct _URB_SELECT_INTERFACE {
|
---|
210 | struct _URB_HEADER Hdr;
|
---|
211 | USBD_CONFIGURATION_HANDLE ConfigurationHandle;
|
---|
212 | USBD_INTERFACE_INFORMATION Interface;
|
---|
213 | };
|
---|
214 |
|
---|
215 | struct _URB_SELECT_CONFIGURATION {
|
---|
216 | struct _URB_HEADER Hdr;
|
---|
217 | PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor;
|
---|
218 | USBD_CONFIGURATION_HANDLE ConfigurationHandle;
|
---|
219 | USBD_INTERFACE_INFORMATION Interface;
|
---|
220 | };
|
---|
221 |
|
---|
222 | struct _URB_PIPE_REQUEST {
|
---|
223 | struct _URB_HEADER Hdr;
|
---|
224 | USBD_PIPE_HANDLE PipeHandle;
|
---|
225 | ULONG Reserved;
|
---|
226 | };
|
---|
227 |
|
---|
228 | struct _URB_FRAME_LENGTH_CONTROL {
|
---|
229 | struct _URB_HEADER Hdr;
|
---|
230 | };
|
---|
231 |
|
---|
232 | struct _URB_GET_FRAME_LENGTH {
|
---|
233 | struct _URB_HEADER Hdr;
|
---|
234 | ULONG FrameLength;
|
---|
235 | ULONG FrameNumber;
|
---|
236 | };
|
---|
237 |
|
---|
238 | struct _URB_SET_FRAME_LENGTH {
|
---|
239 | struct _URB_HEADER Hdr;
|
---|
240 | LONG FrameLengthDelta;
|
---|
241 | };
|
---|
242 |
|
---|
243 | struct _URB_GET_CURRENT_FRAME_NUMBER {
|
---|
244 | struct _URB_HEADER Hdr;
|
---|
245 | ULONG FrameNumber;
|
---|
246 | };
|
---|
247 |
|
---|
248 | struct _URB_CONTROL_TRANSFER {
|
---|
249 | struct _URB_HEADER Hdr;
|
---|
250 | USBD_PIPE_HANDLE PipeHandle;
|
---|
251 | ULONG TransferFlags;
|
---|
252 | ULONG TransferBufferLength;
|
---|
253 | PVOID TransferBuffer;
|
---|
254 | PMDL TransferBufferMDL;
|
---|
255 | struct _URB *UrbLink;
|
---|
256 | struct _URB_HCD_AREA hca;
|
---|
257 | UCHAR SetupPacket[8];
|
---|
258 | };
|
---|
259 |
|
---|
260 | struct _URB_BULK_OR_INTERRUPT_TRANSFER {
|
---|
261 | struct _URB_HEADER Hdr;
|
---|
262 | USBD_PIPE_HANDLE PipeHandle;
|
---|
263 | ULONG TransferFlags;
|
---|
264 | ULONG TransferBufferLength;
|
---|
265 | PVOID TransferBuffer;
|
---|
266 | PMDL TransferBufferMDL;
|
---|
267 | struct _URB *UrbLink;
|
---|
268 | struct _URB_HCD_AREA hca;
|
---|
269 | };
|
---|
270 |
|
---|
271 | struct _URB_ISOCH_TRANSFER {
|
---|
272 | struct _URB_HEADER Hdr;
|
---|
273 | USBD_PIPE_HANDLE PipeHandle;
|
---|
274 | ULONG TransferFlags;
|
---|
275 | ULONG TransferBufferLength;
|
---|
276 | PVOID TransferBuffer;
|
---|
277 | PMDL TransferBufferMDL;
|
---|
278 | struct _URB *UrbLink;
|
---|
279 | struct _URB_HCD_AREA hca;
|
---|
280 | ULONG StartFrame;
|
---|
281 | ULONG NumberOfPackets;
|
---|
282 | ULONG ErrorCount;
|
---|
283 | USBD_ISO_PACKET_DESCRIPTOR IsoPacket[1];
|
---|
284 | };
|
---|
285 |
|
---|
286 | struct _URB_CONTROL_DESCRIPTOR_REQUEST {
|
---|
287 | struct _URB_HEADER Hdr;
|
---|
288 | PVOID Reserved;
|
---|
289 | ULONG Reserved0;
|
---|
290 | ULONG TransferBufferLength;
|
---|
291 | PVOID TransferBuffer;
|
---|
292 | PMDL TransferBufferMDL;
|
---|
293 | struct _URB *UrbLink;
|
---|
294 | struct _URB_HCD_AREA hca;
|
---|
295 | USHORT Reserved1;
|
---|
296 | UCHAR Index;
|
---|
297 | UCHAR DescriptorType;
|
---|
298 | USHORT LanguageId;
|
---|
299 | USHORT Reserved2;
|
---|
300 | };
|
---|
301 |
|
---|
302 | struct _URB_CONTROL_GET_STATUS_REQUEST {
|
---|
303 | struct _URB_HEADER Hdr;
|
---|
304 | PVOID Reserved;
|
---|
305 | ULONG Reserved0;
|
---|
306 | ULONG TransferBufferLength;
|
---|
307 | PVOID TransferBuffer;
|
---|
308 | PMDL TransferBufferMDL;
|
---|
309 | struct _URB *UrbLink;
|
---|
310 | struct _URB_HCD_AREA hca;
|
---|
311 | UCHAR Reserved1[4];
|
---|
312 | USHORT Index;
|
---|
313 | USHORT Reserved2;
|
---|
314 | };
|
---|
315 |
|
---|
316 | struct _URB_CONTROL_FEATURE_REQUEST {
|
---|
317 | struct _URB_HEADER Hdr;
|
---|
318 | PVOID Reserved;
|
---|
319 | ULONG Reserved2;
|
---|
320 | ULONG Reserved3;
|
---|
321 | PVOID Reserved4;
|
---|
322 | PMDL Reserved5;
|
---|
323 | struct _URB *UrbLink;
|
---|
324 | struct _URB_HCD_AREA hca;
|
---|
325 | USHORT Reserved0;
|
---|
326 | USHORT FeatureSelector;
|
---|
327 | USHORT Index;
|
---|
328 | USHORT Reserved1;
|
---|
329 | };
|
---|
330 |
|
---|
331 | struct _URB_CONTROL_VENDOR_OR_CLASS_REQUEST {
|
---|
332 | struct _URB_HEADER Hdr;
|
---|
333 | PVOID Reserved;
|
---|
334 | ULONG TransferFlags;
|
---|
335 | ULONG TransferBufferLength;
|
---|
336 | PVOID TransferBuffer;
|
---|
337 | PMDL TransferBufferMDL;
|
---|
338 | struct _URB *UrbLink;
|
---|
339 | struct _URB_HCD_AREA hca;
|
---|
340 | UCHAR RequestTypeReservedBits;
|
---|
341 | UCHAR Request;
|
---|
342 | USHORT Value;
|
---|
343 | USHORT Index;
|
---|
344 | USHORT Reserved1;
|
---|
345 | };
|
---|
346 |
|
---|
347 | struct _URB_CONTROL_GET_INTERFACE_REQUEST {
|
---|
348 | struct _URB_HEADER Hdr;
|
---|
349 | PVOID Reserved;
|
---|
350 | ULONG Reserved0;
|
---|
351 | ULONG TransferBufferLength;
|
---|
352 | PVOID TransferBuffer;
|
---|
353 | PMDL TransferBufferMDL;
|
---|
354 | struct _URB *UrbLink;
|
---|
355 | struct _URB_HCD_AREA hca;
|
---|
356 | UCHAR Reserved1[4];
|
---|
357 | USHORT Interface;
|
---|
358 | USHORT Reserved2;
|
---|
359 | };
|
---|
360 |
|
---|
361 | struct _URB_CONTROL_GET_CONFIGURATION_REQUEST {
|
---|
362 | struct _URB_HEADER Hdr;
|
---|
363 | PVOID Reserved;
|
---|
364 | ULONG Reserved0;
|
---|
365 | ULONG TransferBufferLength;
|
---|
366 | PVOID TransferBuffer;
|
---|
367 | PMDL TransferBufferMDL;
|
---|
368 | struct _URB *UrbLink;
|
---|
369 | struct _URB_HCD_AREA hca;
|
---|
370 | UCHAR Reserved1[8];
|
---|
371 | };
|
---|
372 |
|
---|
373 | struct _URB_OS_FEATURE_DESCRIPTOR_REQUEST {
|
---|
374 | struct _URB_HEADER Hdr;
|
---|
375 | PVOID Reserved;
|
---|
376 | ULONG Reserved0;
|
---|
377 | ULONG TransferBufferLength;
|
---|
378 | PVOID TransferBuffer;
|
---|
379 | PMDL TransferBufferMDL;
|
---|
380 | struct _URB *UrbLink;
|
---|
381 | struct _URB_HCD_AREA hca;
|
---|
382 | UCHAR Recipient:5;
|
---|
383 | UCHAR Reserved1:3;
|
---|
384 | UCHAR Reserved2;
|
---|
385 | UCHAR InterfaceNumber;
|
---|
386 | UCHAR MS_PageIndex;
|
---|
387 | USHORT MS_FeatureDescriptorIndex;
|
---|
388 | USHORT Reserved3;
|
---|
389 | };
|
---|
390 |
|
---|
391 | typedef struct _URB {
|
---|
392 | union {
|
---|
393 | struct _URB_HEADER UrbHeader;
|
---|
394 | struct _URB_SELECT_INTERFACE UrbSelectInterface;
|
---|
395 | struct _URB_SELECT_CONFIGURATION UrbSelectConfiguration;
|
---|
396 | struct _URB_PIPE_REQUEST UrbPipeRequest;
|
---|
397 | struct _URB_FRAME_LENGTH_CONTROL UrbFrameLengthControl;
|
---|
398 | struct _URB_GET_FRAME_LENGTH UrbGetFrameLength;
|
---|
399 | struct _URB_SET_FRAME_LENGTH UrbSetFrameLength;
|
---|
400 | struct _URB_GET_CURRENT_FRAME_NUMBER UrbGetCurrentFrameNumber;
|
---|
401 | struct _URB_CONTROL_TRANSFER UrbControlTransfer;
|
---|
402 | struct _URB_BULK_OR_INTERRUPT_TRANSFER UrbBulkOrInterruptTransfer;
|
---|
403 | struct _URB_ISOCH_TRANSFER UrbIsochronousTransfer;
|
---|
404 | struct _URB_CONTROL_DESCRIPTOR_REQUEST UrbControlDescriptorRequest;
|
---|
405 | struct _URB_CONTROL_GET_STATUS_REQUEST UrbControlGetStatusRequest;
|
---|
406 | struct _URB_CONTROL_FEATURE_REQUEST UrbControlFeatureRequest;
|
---|
407 | struct _URB_CONTROL_VENDOR_OR_CLASS_REQUEST UrbControlVendorClassRequest;
|
---|
408 | struct _URB_CONTROL_GET_INTERFACE_REQUEST UrbControlGetInterfaceRequest;
|
---|
409 | struct _URB_CONTROL_GET_CONFIGURATION_REQUEST UrbControlGetConfigurationRequest;
|
---|
410 | struct _URB_OS_FEATURE_DESCRIPTOR_REQUEST UrbOSFeatureDescriptorRequest;
|
---|
411 | } DUMMYUNIONNAME;
|
---|
412 | } URB;
|
---|
413 | typedef struct _URB *PURB;
|
---|
414 |
|
---|
415 | #endif
|
---|