]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Include/Protocol/UsbIo.h
MdePkg/ProcessorBind: add defines for page allocation granularity
[mirror_edk2.git] / MdePkg / Include / Protocol / UsbIo.h
... / ...
CommitLineData
1/** @file\r
2 EFI Usb I/O Protocol as defined in UEFI specification.\r
3 This protocol is used by code, typically drivers, running in the EFI \r
4 boot services environment to access USB devices like USB keyboards, \r
5 mice and mass storage devices. In particular, functions for managing devices \r
6 on USB buses are defined here.\r
7 \r
8 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
9 This program and the accompanying materials\r
10 are licensed and made available under the terms and conditions of the BSD License\r
11 which accompanies this distribution. The full text of the license may be found at\r
12 http://opensource.org/licenses/bsd-license.php\r
13\r
14 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
15 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
16\r
17**/\r
18\r
19#ifndef __USB_IO_H__\r
20#define __USB_IO_H__\r
21\r
22#include <IndustryStandard/Usb.h>\r
23\r
24//\r
25// Global ID for the USB I/O Protocol\r
26//\r
27#define EFI_USB_IO_PROTOCOL_GUID \\r
28 { \\r
29 0x2B2F68D6, 0x0CD2, 0x44cf, {0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75 } \\r
30 }\r
31\r
32typedef struct _EFI_USB_IO_PROTOCOL EFI_USB_IO_PROTOCOL;\r
33\r
34//\r
35// Related Definition for EFI USB I/O protocol\r
36//\r
37\r
38//\r
39// USB standard descriptors and reqeust\r
40//\r
41typedef USB_DEVICE_REQUEST EFI_USB_DEVICE_REQUEST;\r
42typedef USB_DEVICE_DESCRIPTOR EFI_USB_DEVICE_DESCRIPTOR;\r
43typedef USB_CONFIG_DESCRIPTOR EFI_USB_CONFIG_DESCRIPTOR;\r
44typedef USB_INTERFACE_DESCRIPTOR EFI_USB_INTERFACE_DESCRIPTOR;\r
45typedef USB_ENDPOINT_DESCRIPTOR EFI_USB_ENDPOINT_DESCRIPTOR;\r
46\r
47///\r
48/// USB data transfer direction\r
49///\r
50typedef enum {\r
51 EfiUsbDataIn,\r
52 EfiUsbDataOut,\r
53 EfiUsbNoData\r
54} EFI_USB_DATA_DIRECTION;\r
55\r
56//\r
57// USB Transfer Results\r
58//\r
59#define EFI_USB_NOERROR 0x00\r
60#define EFI_USB_ERR_NOTEXECUTE 0x01\r
61#define EFI_USB_ERR_STALL 0x02\r
62#define EFI_USB_ERR_BUFFER 0x04\r
63#define EFI_USB_ERR_BABBLE 0x08\r
64#define EFI_USB_ERR_NAK 0x10\r
65#define EFI_USB_ERR_CRC 0x20\r
66#define EFI_USB_ERR_TIMEOUT 0x40\r
67#define EFI_USB_ERR_BITSTUFF 0x80\r
68#define EFI_USB_ERR_SYSTEM 0x100\r
69\r
70/**\r
71 Async USB transfer callback routine.\r
72\r
73 @param Data Data received or sent via the USB Asynchronous Transfer, if the\r
74 transfer completed successfully.\r
75 @param DataLength The length of Data received or sent via the Asynchronous\r
76 Transfer, if transfer successfully completes.\r
77 @param Context Data passed from UsbAsyncInterruptTransfer() request.\r
78 @param Status Indicates the result of the asynchronous transfer.\r
79\r
80 @retval EFI_SUCCESS The asynchronous USB transfer request has been successfully executed.\r
81 @retval EFI_DEVICE_ERROR The asynchronous USB transfer request failed.\r
82\r
83**/\r
84typedef\r
85EFI_STATUS\r
86(EFIAPI *EFI_ASYNC_USB_TRANSFER_CALLBACK)(\r
87 IN VOID *Data,\r
88 IN UINTN DataLength,\r
89 IN VOID *Context,\r
90 IN UINT32 Status\r
91 );\r
92\r
93//\r
94// Prototype for EFI USB I/O protocol\r
95//\r
96\r
97\r
98/**\r
99 This function is used to manage a USB device with a control transfer pipe. A control transfer is\r
100 typically used to perform device initialization and configuration.\r
101\r
102 @param This A pointer to the EFI_USB_IO_PROTOCOL instance.\r
103 @param Request A pointer to the USB device request that will be sent to the USB\r
104 device.\r
105 @param Direction Indicates the data direction.\r
106 @param Timeout Indicating the transfer should be completed within this time frame.\r
107 The units are in milliseconds.\r
108 @param Data A pointer to the buffer of data that will be transmitted to USB\r
109 device or received from USB device.\r
110 @param DataLength The size, in bytes, of the data buffer specified by Data.\r
111 @param Status A pointer to the result of the USB transfer.\r
112\r
113 @retval EFI_SUCCESS The control transfer has been successfully executed.\r
114 @retval EFI_DEVICE_ERROR The transfer failed. The transfer status is returned in Status.\r
115 @retval EFI_INVALID_PARAMETE One or more parameters are invalid.\r
116 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r
117 @retval EFI_TIMEOUT The control transfer fails due to timeout.\r
118\r
119**/\r
120typedef\r
121EFI_STATUS\r
122(EFIAPI *EFI_USB_IO_CONTROL_TRANSFER)(\r
123 IN EFI_USB_IO_PROTOCOL *This,\r
124 IN EFI_USB_DEVICE_REQUEST *Request,\r
125 IN EFI_USB_DATA_DIRECTION Direction,\r
126 IN UINT32 Timeout,\r
127 IN OUT VOID *Data OPTIONAL,\r
128 IN UINTN DataLength OPTIONAL,\r
129 OUT UINT32 *Status\r
130 );\r
131\r
132/**\r
133 This function is used to manage a USB device with the bulk transfer pipe. Bulk Transfers are\r
134 typically used to transfer large amounts of data to/from USB devices.\r
135\r
136 @param This A pointer to the EFI_USB_IO_PROTOCOL instance.\r
137 @param DeviceEndpoint The destination USB device endpoint to which the \r
138 device request is being sent. DeviceEndpoint must \r
139 be between 0x01 and 0x0F or between 0x81 and 0x8F, \r
140 otherwise EFI_INVALID_PARAMETER is returned. If \r
141 the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER \r
142 is returned. The MSB of this parameter indicates \r
143 the endpoint direction. The number "1" stands for \r
144 an IN endpoint, and "0" stands for an OUT endpoint.\r
145 @param Data A pointer to the buffer of data that will be transmitted to USB\r
146 device or received from USB device.\r
147 @param DataLength The size, in bytes, of the data buffer specified by Data.\r
148 On input, the size, in bytes, of the data buffer specified by Data.\r
149 On output, the number of bytes that were actually transferred.\r
150 @param Timeout Indicating the transfer should be completed within this time frame.\r
151 The units are in milliseconds. If Timeout is 0, then the \r
152 caller must wait for the function to be completed until \r
153 EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
154 @param Status This parameter indicates the USB transfer status.\r
155\r
156 @retval EFI_SUCCESS The bulk transfer has been successfully executed.\r
157 @retval EFI_DEVICE_ERROR The transfer failed. The transfer status is returned in Status.\r
158 @retval EFI_INVALID_PARAMETE One or more parameters are invalid.\r
159 @retval EFI_OUT_OF_RESOURCES The request could not be submitted due to a lack of resources.\r
160 @retval EFI_TIMEOUT The control transfer fails due to timeout.\r
161\r
162**/\r
163typedef\r
164EFI_STATUS\r
165(EFIAPI *EFI_USB_IO_BULK_TRANSFER)(\r
166 IN EFI_USB_IO_PROTOCOL *This,\r
167 IN UINT8 DeviceEndpoint,\r
168 IN OUT VOID *Data,\r
169 IN OUT UINTN *DataLength,\r
170 IN UINTN Timeout,\r
171 OUT UINT32 *Status\r
172 );\r
173\r
174/**\r
175 This function is used to manage a USB device with an interrupt transfer pipe. An Asynchronous\r
176 Interrupt Transfer is typically used to query a device's status at a fixed rate. For example,\r
177 keyboard, mouse, and hub devices use this type of transfer to query their interrupt endpoints at\r
178 a fixed rate.\r
179\r
180 @param This A pointer to the EFI_USB_IO_PROTOCOL instance.\r
181 @param DeviceEndpoint The destination USB device endpoint to which the \r
182 device request is being sent. DeviceEndpoint must \r
183 be between 0x01 and 0x0F or between 0x81 and 0x8F, \r
184 otherwise EFI_INVALID_PARAMETER is returned. If \r
185 the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER \r
186 is returned. The MSB of this parameter indicates \r
187 the endpoint direction. The number "1" stands for \r
188 an IN endpoint, and "0" stands for an OUT endpoint.\r
189 @param IsNewTransfer If TRUE, a new transfer will be submitted to USB controller. If\r
190 FALSE, the interrupt transfer is deleted from the device's interrupt\r
191 transfer queue.\r
192 @param PollingInterval Indicates the periodic rate, in milliseconds, that the transfer is to be\r
193 executed.This parameter is required when IsNewTransfer is TRUE. The \r
194 value must be between 1 to 255, otherwise EFI_INVALID_PARAMETER is returned. \r
195 The units are in milliseconds.\r
196 @param DataLength Specifies the length, in bytes, of the data to be received from the\r
197 USB device. This parameter is only required when IsNewTransfer is TRUE.\r
198 @param InterruptCallback The Callback function. This function is called if the asynchronous\r
199 interrupt transfer is completed. This parameter is required \r
200 when IsNewTransfer is TRUE.\r
201 @param Context Data passed to the InterruptCallback function. This is an optional \r
202 parameter and may be NULL.\r
203\r
204 @retval EFI_SUCCESS The asynchronous USB transfer request transfer has been successfully executed.\r
205 @retval EFI_DEVICE_ERROR The asynchronous USB transfer request failed.\r
206\r
207**/\r
208typedef\r
209EFI_STATUS\r
210(EFIAPI *EFI_USB_IO_ASYNC_INTERRUPT_TRANSFER)(\r
211 IN EFI_USB_IO_PROTOCOL *This,\r
212 IN UINT8 DeviceEndpoint,\r
213 IN BOOLEAN IsNewTransfer,\r
214 IN UINTN PollingInterval OPTIONAL,\r
215 IN UINTN DataLength OPTIONAL,\r
216 IN EFI_ASYNC_USB_TRANSFER_CALLBACK InterruptCallBack OPTIONAL,\r
217 IN VOID *Context OPTIONAL\r
218 );\r
219\r
220/**\r
221 This function is used to manage a USB device with an interrupt transfer pipe.\r
222\r
223 @param This A pointer to the EFI_USB_IO_PROTOCOL instance.\r
224 @param DeviceEndpoint The destination USB device endpoint to which the \r
225 device request is being sent. DeviceEndpoint must \r
226 be between 0x01 and 0x0F or between 0x81 and 0x8F, \r
227 otherwise EFI_INVALID_PARAMETER is returned. If \r
228 the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER \r
229 is returned. The MSB of this parameter indicates \r
230 the endpoint direction. The number "1" stands for \r
231 an IN endpoint, and "0" stands for an OUT endpoint.\r
232 @param Data A pointer to the buffer of data that will be transmitted to USB\r
233 device or received from USB device.\r
234 @param DataLength On input, then size, in bytes, of the buffer Data. On output, the\r
235 amount of data actually transferred.\r
236 @param Timeout The time out, in seconds, for this transfer. If Timeout is 0, \r
237 then the caller must wait for the function to be completed \r
238 until EFI_SUCCESS or EFI_DEVICE_ERROR is returned. If the \r
239 transfer is not completed in this time frame, then EFI_TIMEOUT is returned.\r
240 @param Status This parameter indicates the USB transfer status.\r
241\r
242 @retval EFI_SUCCESS The sync interrupt transfer has been successfully executed.\r
243 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
244 @retval EFI_DEVICE_ERROR The sync interrupt transfer request failed.\r
245 @retval EFI_OUT_OF_RESOURCES The request could not be submitted due to a lack of resources.\r
246 @retval EFI_TIMEOUT The transfer fails due to timeout.\r
247**/\r
248typedef\r
249EFI_STATUS\r
250(EFIAPI *EFI_USB_IO_SYNC_INTERRUPT_TRANSFER)(\r
251 IN EFI_USB_IO_PROTOCOL *This,\r
252 IN UINT8 DeviceEndpoint,\r
253 IN OUT VOID *Data,\r
254 IN OUT UINTN *DataLength,\r
255 IN UINTN Timeout,\r
256 OUT UINT32 *Status\r
257 );\r
258\r
259/**\r
260 This function is used to manage a USB device with an isochronous transfer pipe. An Isochronous\r
261 transfer is typically used to transfer streaming data.\r
262\r
263 @param This A pointer to the EFI_USB_IO_PROTOCOL instance.\r
264 @param DeviceEndpoint The destination USB device endpoint to which the \r
265 device request is being sent. DeviceEndpoint must \r
266 be between 0x01 and 0x0F or between 0x81 and 0x8F, \r
267 otherwise EFI_INVALID_PARAMETER is returned. If \r
268 the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER \r
269 is returned. The MSB of this parameter indicates \r
270 the endpoint direction. The number "1" stands for \r
271 an IN endpoint, and "0" stands for an OUT endpoint.\r
272 @param Data A pointer to the buffer of data that will be transmitted to USB\r
273 device or received from USB device.\r
274 @param DataLength The size, in bytes, of the data buffer specified by Data.\r
275 @param Status This parameter indicates the USB transfer status.\r
276\r
277 @retval EFI_SUCCESS The isochronous transfer has been successfully executed.\r
278 @retval EFI_INVALID_PARAMETER The parameter DeviceEndpoint is not valid.\r
279 @retval EFI_DEVICE_ERROR The transfer failed due to the reason other than timeout, The error status\r
280 is returned in Status.\r
281 @retval EFI_OUT_OF_RESOURCES The request could not be submitted due to a lack of resources.\r
282 @retval EFI_TIMEOUT The transfer fails due to timeout.\r
283**/\r
284typedef\r
285EFI_STATUS\r
286(EFIAPI *EFI_USB_IO_ISOCHRONOUS_TRANSFER)(\r
287 IN EFI_USB_IO_PROTOCOL *This,\r
288 IN UINT8 DeviceEndpoint,\r
289 IN OUT VOID *Data,\r
290 IN UINTN DataLength,\r
291 OUT UINT32 *Status\r
292 );\r
293\r
294/**\r
295 This function is used to manage a USB device with an isochronous transfer pipe. An Isochronous\r
296 transfer is typically used to transfer streaming data.\r
297\r
298 @param This A pointer to the EFI_USB_IO_PROTOCOL instance.\r
299 @param DeviceEndpoint The destination USB device endpoint to which the \r
300 device request is being sent. DeviceEndpoint must \r
301 be between 0x01 and 0x0F or between 0x81 and 0x8F, \r
302 otherwise EFI_INVALID_PARAMETER is returned. If \r
303 the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER \r
304 is returned. The MSB of this parameter indicates \r
305 the endpoint direction. The number "1" stands for \r
306 an IN endpoint, and "0" stands for an OUT endpoint.\r
307 @param Data A pointer to the buffer of data that will be transmitted to USB\r
308 device or received from USB device.\r
309 @param DataLength The size, in bytes, of the data buffer specified by Data.\r
310 This is an optional parameter and may be NULL.\r
311 @param IsochronousCallback The IsochronousCallback() function.This function is \r
312 called if the requested isochronous transfer is completed.\r
313 @param Context Data passed to the IsochronousCallback() function.\r
314\r
315 @retval EFI_SUCCESS The asynchronous isochronous transfer has been successfully submitted\r
316 to the system.\r
317 @retval EFI_INVALID_PARAMETER The parameter DeviceEndpoint is not valid.\r
318 @retval EFI_OUT_OF_RESOURCES The request could not be submitted due to a lack of resources.\r
319\r
320**/\r
321typedef\r
322EFI_STATUS\r
323(EFIAPI *EFI_USB_IO_ASYNC_ISOCHRONOUS_TRANSFER)(\r
324 IN EFI_USB_IO_PROTOCOL *This,\r
325 IN UINT8 DeviceEndpoint,\r
326 IN OUT VOID *Data,\r
327 IN UINTN DataLength,\r
328 IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack,\r
329 IN VOID *Context OPTIONAL\r
330 );\r
331\r
332/**\r
333 Resets and reconfigures the USB controller. This function will work for all USB devices except\r
334 USB Hub Controllers.\r
335\r
336 @param This A pointer to the EFI_USB_IO_PROTOCOL instance.\r
337\r
338 @retval EFI_SUCCESS The USB controller was reset.\r
339 @retval EFI_INVALID_PARAMETER If the controller specified by This is a USB hub.\r
340 @retval EFI_DEVICE_ERROR An error occurred during the reconfiguration process.\r
341\r
342**/\r
343typedef\r
344EFI_STATUS\r
345(EFIAPI *EFI_USB_IO_PORT_RESET)(\r
346 IN EFI_USB_IO_PROTOCOL *This\r
347 );\r
348\r
349/**\r
350 Retrieves the USB Device Descriptor.\r
351\r
352 @param This A pointer to the EFI_USB_IO_PROTOCOL instance.\r
353 @param DeviceDescriptor A pointer to the caller allocated USB Device Descriptor.\r
354\r
355 @retval EFI_SUCCESS The device descriptor was retrieved successfully.\r
356 @retval EFI_INVALID_PARAMETER DeviceDescriptor is NULL.\r
357 @retval EFI_NOT_FOUND The device descriptor was not found. The device may not be configured.\r
358\r
359**/\r
360typedef\r
361EFI_STATUS\r
362(EFIAPI *EFI_USB_IO_GET_DEVICE_DESCRIPTOR)(\r
363 IN EFI_USB_IO_PROTOCOL *This,\r
364 OUT EFI_USB_DEVICE_DESCRIPTOR *DeviceDescriptor\r
365 );\r
366\r
367/**\r
368 Retrieves the USB Device Descriptor.\r
369\r
370 @param This A pointer to the EFI_USB_IO_PROTOCOL instance.\r
371 @param ConfigurationDescriptor A pointer to the caller allocated USB Active Configuration\r
372 Descriptor.\r
373 @retval EFI_SUCCESS The active configuration descriptor was retrieved successfully.\r
374 @retval EFI_INVALID_PARAMETER ConfigurationDescriptor is NULL.\r
375 @retval EFI_NOT_FOUND An active configuration descriptor cannot be found. The device may not\r
376 be configured.\r
377\r
378**/\r
379typedef\r
380EFI_STATUS\r
381(EFIAPI *EFI_USB_IO_GET_CONFIG_DESCRIPTOR)(\r
382 IN EFI_USB_IO_PROTOCOL *This,\r
383 OUT EFI_USB_CONFIG_DESCRIPTOR *ConfigurationDescriptor\r
384 );\r
385\r
386/**\r
387 Retrieves the Interface Descriptor for a USB Device Controller. As stated earlier, an interface\r
388 within a USB device is equivalently to a USB Controller within the current configuration.\r
389\r
390 @param This A pointer to the EFI_USB_IO_PROTOCOL instance.\r
391 @param InterfaceDescriptor A pointer to the caller allocated USB Interface Descriptor within\r
392 the configuration setting.\r
393 @retval EFI_SUCCESS The interface descriptor retrieved successfully.\r
394 @retval EFI_INVALID_PARAMETER InterfaceDescriptor is NULL.\r
395 @retval EFI_NOT_FOUND The interface descriptor cannot be found. The device may not be\r
396 correctly configured.\r
397\r
398**/\r
399typedef\r
400EFI_STATUS\r
401(EFIAPI *EFI_USB_IO_GET_INTERFACE_DESCRIPTOR)(\r
402 IN EFI_USB_IO_PROTOCOL *This,\r
403 OUT EFI_USB_INTERFACE_DESCRIPTOR *InterfaceDescriptor\r
404 );\r
405\r
406/**\r
407 Retrieves an Endpoint Descriptor within a USB Controller.\r
408\r
409 @param This A pointer to the EFI_USB_IO_PROTOCOL instance.\r
410 @param EndpointIndex Indicates which endpoint descriptor to retrieve.\r
411 @param EndpointDescriptor A pointer to the caller allocated USB Endpoint Descriptor of\r
412 a USB controller.\r
413\r
414 @retval EFI_SUCCESS The endpoint descriptor was retrieved successfully.\r
415 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
416 @retval EFI_NOT_FOUND The endpoint descriptor cannot be found. The device may not be\r
417 correctly configured.\r
418\r
419**/\r
420typedef\r
421EFI_STATUS\r
422(EFIAPI *EFI_USB_IO_GET_ENDPOINT_DESCRIPTOR)(\r
423 IN EFI_USB_IO_PROTOCOL *This,\r
424 IN UINT8 EndpointIndex,\r
425 OUT EFI_USB_ENDPOINT_DESCRIPTOR *EndpointDescriptor\r
426 );\r
427\r
428/**\r
429 Retrieves a string stored in a USB Device.\r
430\r
431 @param This A pointer to the EFI_USB_IO_PROTOCOL instance.\r
432 @param LangID The Language ID for the string being retrieved.\r
433 @param StringID The ID of the string being retrieved.\r
434 @param String A pointer to a buffer allocated by this function with\r
435 AllocatePool() to store the string.If this function \r
436 returns EFI_SUCCESS, it stores the string the caller \r
437 wants to get. The caller should release the string \r
438 buffer with FreePool() after the string is not used any more.\r
439\r
440 @retval EFI_SUCCESS The string was retrieved successfully.\r
441 @retval EFI_NOT_FOUND The string specified by LangID and StringID was not found.\r
442 @retval EFI_OUT_OF_RESOURCES There are not enough resources to allocate the return buffer String.\r
443\r
444**/\r
445typedef\r
446EFI_STATUS\r
447(EFIAPI *EFI_USB_IO_GET_STRING_DESCRIPTOR)(\r
448 IN EFI_USB_IO_PROTOCOL *This,\r
449 IN UINT16 LangID,\r
450 IN UINT8 StringID,\r
451 OUT CHAR16 **String\r
452 );\r
453\r
454/**\r
455 Retrieves all the language ID codes that the USB device supports.\r
456\r
457 @param This A pointer to the EFI_USB_IO_PROTOCOL instance.\r
458 @param LangIDTable Language ID for the string the caller wants to get.\r
459 This is a 16-bit ID defined by Microsoft. This \r
460 buffer pointer is allocated and maintained by \r
461 the USB Bus Driver, the caller should not modify \r
462 its contents.\r
463 @param TableSize The size, in bytes, of the table LangIDTable.\r
464\r
465 @retval EFI_SUCCESS The support languages were retrieved successfully.\r
466\r
467**/\r
468typedef\r
469EFI_STATUS\r
470(EFIAPI *EFI_USB_IO_GET_SUPPORTED_LANGUAGE)(\r
471 IN EFI_USB_IO_PROTOCOL *This,\r
472 OUT UINT16 **LangIDTable,\r
473 OUT UINT16 *TableSize\r
474 );\r
475\r
476///\r
477/// The EFI_USB_IO_PROTOCOL provides four basic transfers types described \r
478/// in the USB 1.1 Specification. These include control transfer, interrupt \r
479/// transfer, bulk transfer and isochronous transfer. The EFI_USB_IO_PROTOCOL \r
480/// also provides some basic USB device/controller management and configuration \r
481/// interfaces. A USB device driver uses the services of this protocol to manage USB devices. \r
482///\r
483struct _EFI_USB_IO_PROTOCOL {\r
484 //\r
485 // IO transfer\r
486 //\r
487 EFI_USB_IO_CONTROL_TRANSFER UsbControlTransfer;\r
488 EFI_USB_IO_BULK_TRANSFER UsbBulkTransfer;\r
489 EFI_USB_IO_ASYNC_INTERRUPT_TRANSFER UsbAsyncInterruptTransfer;\r
490 EFI_USB_IO_SYNC_INTERRUPT_TRANSFER UsbSyncInterruptTransfer;\r
491 EFI_USB_IO_ISOCHRONOUS_TRANSFER UsbIsochronousTransfer;\r
492 EFI_USB_IO_ASYNC_ISOCHRONOUS_TRANSFER UsbAsyncIsochronousTransfer;\r
493\r
494 //\r
495 // Common device request\r
496 //\r
497 EFI_USB_IO_GET_DEVICE_DESCRIPTOR UsbGetDeviceDescriptor;\r
498 EFI_USB_IO_GET_CONFIG_DESCRIPTOR UsbGetConfigDescriptor;\r
499 EFI_USB_IO_GET_INTERFACE_DESCRIPTOR UsbGetInterfaceDescriptor;\r
500 EFI_USB_IO_GET_ENDPOINT_DESCRIPTOR UsbGetEndpointDescriptor;\r
501 EFI_USB_IO_GET_STRING_DESCRIPTOR UsbGetStringDescriptor;\r
502 EFI_USB_IO_GET_SUPPORTED_LANGUAGE UsbGetSupportedLanguages;\r
503\r
504 //\r
505 // Reset controller's parent port\r
506 //\r
507 EFI_USB_IO_PORT_RESET UsbPortReset;\r
508};\r
509\r
510extern EFI_GUID gEfiUsbIoProtocolGuid;\r
511\r
512#endif\r