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