iPXE
UsbIo.h
Go to the documentation of this file.
00001 /** @file
00002   EFI Usb I/O Protocol as defined in UEFI specification.
00003   This protocol is used by code, typically drivers, running in the EFI
00004   boot services environment to access USB devices like USB keyboards,
00005   mice and mass storage devices. In particular, functions for managing devices
00006   on USB buses are defined here.
00007 
00008   Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
00009   This program and the accompanying materials
00010   are licensed and made available under the terms and conditions of the BSD License
00011   which accompanies this distribution.  The full text of the license may be found at
00012   http://opensource.org/licenses/bsd-license.php
00013 
00014   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
00015   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
00016 
00017 **/
00018 
00019 #ifndef __USB_IO_H__
00020 #define __USB_IO_H__
00021 
00022 FILE_LICENCE ( BSD3 );
00023 
00024 #include <ipxe/efi/IndustryStandard/Usb.h>
00025 
00026 //
00027 // Global ID for the USB I/O Protocol
00028 //
00029 #define EFI_USB_IO_PROTOCOL_GUID \
00030   { \
00031     0x2B2F68D6, 0x0CD2, 0x44cf, {0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75 } \
00032   }
00033 
00034 typedef struct _EFI_USB_IO_PROTOCOL   EFI_USB_IO_PROTOCOL;
00035 
00036 //
00037 // Related Definition for EFI USB I/O protocol
00038 //
00039 
00040 //
00041 // USB standard descriptors and reqeust
00042 //
00043 typedef USB_DEVICE_REQUEST        EFI_USB_DEVICE_REQUEST;
00044 typedef USB_DEVICE_DESCRIPTOR     EFI_USB_DEVICE_DESCRIPTOR;
00045 typedef USB_CONFIG_DESCRIPTOR     EFI_USB_CONFIG_DESCRIPTOR;
00046 typedef USB_INTERFACE_DESCRIPTOR  EFI_USB_INTERFACE_DESCRIPTOR;
00047 typedef USB_ENDPOINT_DESCRIPTOR   EFI_USB_ENDPOINT_DESCRIPTOR;
00048 
00049 ///
00050 /// USB data transfer direction
00051 ///
00052 typedef enum {
00053   EfiUsbDataIn,
00054   EfiUsbDataOut,
00055   EfiUsbNoData
00056 } EFI_USB_DATA_DIRECTION;
00057 
00058 //
00059 // USB Transfer Results
00060 //
00061 #define EFI_USB_NOERROR             0x00
00062 #define EFI_USB_ERR_NOTEXECUTE      0x01
00063 #define EFI_USB_ERR_STALL           0x02
00064 #define EFI_USB_ERR_BUFFER          0x04
00065 #define EFI_USB_ERR_BABBLE          0x08
00066 #define EFI_USB_ERR_NAK             0x10
00067 #define EFI_USB_ERR_CRC             0x20
00068 #define EFI_USB_ERR_TIMEOUT         0x40
00069 #define EFI_USB_ERR_BITSTUFF        0x80
00070 #define EFI_USB_ERR_SYSTEM          0x100
00071 
00072 /**
00073   Async USB transfer callback routine.
00074 
00075   @param  Data                  Data received or sent via the USB Asynchronous Transfer, if the
00076                                 transfer completed successfully.
00077   @param  DataLength            The length of Data received or sent via the Asynchronous
00078                                 Transfer, if transfer successfully completes.
00079   @param  Context               Data passed from UsbAsyncInterruptTransfer() request.
00080   @param  Status                Indicates the result of the asynchronous transfer.
00081 
00082   @retval EFI_SUCCESS           The asynchronous USB transfer request has been successfully executed.
00083   @retval EFI_DEVICE_ERROR      The asynchronous USB transfer request failed.
00084 
00085 **/
00086 typedef
00087 EFI_STATUS
00088 (EFIAPI *EFI_ASYNC_USB_TRANSFER_CALLBACK)(
00089   IN VOID         *Data,
00090   IN UINTN        DataLength,
00091   IN VOID         *Context,
00092   IN UINT32       Status
00093   );
00094 
00095 //
00096 // Prototype for EFI USB I/O protocol
00097 //
00098 
00099 
00100 /**
00101   This function is used to manage a USB device with a control transfer pipe. A control transfer is
00102   typically used to perform device initialization and configuration.
00103 
00104   @param  This                  A pointer to the EFI_USB_IO_PROTOCOL instance.
00105   @param  Request               A pointer to the USB device request that will be sent to the USB
00106                                 device.
00107   @param  Direction             Indicates the data direction.
00108   @param  Timeout               Indicating the transfer should be completed within this time frame.
00109                                 The units are in milliseconds.
00110   @param  Data                  A pointer to the buffer of data that will be transmitted to USB
00111                                 device or received from USB device.
00112   @param  DataLength            The size, in bytes, of the data buffer specified by Data.
00113   @param  Status                A pointer to the result of the USB transfer.
00114 
00115   @retval EFI_SUCCESS           The control transfer has been successfully executed.
00116   @retval EFI_DEVICE_ERROR      The transfer failed. The transfer status is returned in Status.
00117   @retval EFI_INVALID_PARAMETE  One or more parameters are invalid.
00118   @retval EFI_OUT_OF_RESOURCES  The request could not be completed due to a lack of resources.
00119   @retval EFI_TIMEOUT           The control transfer fails due to timeout.
00120 
00121 **/
00122 typedef
00123 EFI_STATUS
00124 (EFIAPI *EFI_USB_IO_CONTROL_TRANSFER)(
00125   IN EFI_USB_IO_PROTOCOL                        *This,
00126   IN EFI_USB_DEVICE_REQUEST                     *Request,
00127   IN EFI_USB_DATA_DIRECTION                     Direction,
00128   IN UINT32                                     Timeout,
00129   IN OUT VOID                                   *Data OPTIONAL,
00130   IN UINTN                                      DataLength  OPTIONAL,
00131   OUT UINT32                                    *Status
00132   );
00133 
00134 /**
00135   This function is used to manage a USB device with the bulk transfer pipe. Bulk Transfers are
00136   typically used to transfer large amounts of data to/from USB devices.
00137 
00138   @param  This                  A pointer to the EFI_USB_IO_PROTOCOL instance.
00139   @param  DeviceEndpoint        The destination USB device endpoint to which the
00140                                 device request is being sent. DeviceEndpoint must
00141                                 be between 0x01 and 0x0F or between 0x81 and 0x8F,
00142                                 otherwise EFI_INVALID_PARAMETER is returned. If
00143                                 the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER
00144                                 is returned. The MSB of this parameter indicates
00145                                 the endpoint direction. The number "1" stands for
00146                                 an IN endpoint, and "0" stands for an OUT endpoint.
00147   @param  Data                  A pointer to the buffer of data that will be transmitted to USB
00148                                 device or received from USB device.
00149   @param  DataLength            The size, in bytes, of the data buffer specified by Data.
00150                                 On input, the size, in bytes, of the data buffer specified by Data.
00151                                 On output, the number of bytes that were actually transferred.
00152   @param  Timeout               Indicating the transfer should be completed within this time frame.
00153                                 The units are in milliseconds. If Timeout is 0, then the
00154                                 caller must wait for the function to be completed until
00155                                 EFI_SUCCESS or EFI_DEVICE_ERROR is returned.
00156   @param  Status                This parameter indicates the USB transfer status.
00157 
00158   @retval EFI_SUCCESS           The bulk transfer has been successfully executed.
00159   @retval EFI_DEVICE_ERROR      The transfer failed. The transfer status is returned in Status.
00160   @retval EFI_INVALID_PARAMETE  One or more parameters are invalid.
00161   @retval EFI_OUT_OF_RESOURCES  The request could not be submitted due to a lack of resources.
00162   @retval EFI_TIMEOUT           The control transfer fails due to timeout.
00163 
00164 **/
00165 typedef
00166 EFI_STATUS
00167 (EFIAPI *EFI_USB_IO_BULK_TRANSFER)(
00168   IN EFI_USB_IO_PROTOCOL            *This,
00169   IN UINT8                          DeviceEndpoint,
00170   IN OUT VOID                       *Data,
00171   IN OUT UINTN                      *DataLength,
00172   IN UINTN                          Timeout,
00173   OUT UINT32                        *Status
00174   );
00175 
00176 /**
00177   This function is used to manage a USB device with an interrupt transfer pipe. An Asynchronous
00178   Interrupt Transfer is typically used to query a device's status at a fixed rate. For example,
00179   keyboard, mouse, and hub devices use this type of transfer to query their interrupt endpoints at
00180   a fixed rate.
00181 
00182   @param  This                  A pointer to the EFI_USB_IO_PROTOCOL instance.
00183   @param  DeviceEndpoint        The destination USB device endpoint to which the
00184                                 device request is being sent. DeviceEndpoint must
00185                                 be between 0x01 and 0x0F or between 0x81 and 0x8F,
00186                                 otherwise EFI_INVALID_PARAMETER is returned. If
00187                                 the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER
00188                                 is returned. The MSB of this parameter indicates
00189                                 the endpoint direction. The number "1" stands for
00190                                 an IN endpoint, and "0" stands for an OUT endpoint.
00191   @param  IsNewTransfer         If TRUE, a new transfer will be submitted to USB controller. If
00192                                 FALSE, the interrupt transfer is deleted from the device's interrupt
00193                                 transfer queue.
00194   @param  PollingInterval       Indicates the periodic rate, in milliseconds, that the transfer is to be
00195                                 executed.This parameter is required when IsNewTransfer is TRUE. The
00196                                 value must be between 1 to 255, otherwise EFI_INVALID_PARAMETER is returned.
00197                                 The units are in milliseconds.
00198   @param  DataLength            Specifies the length, in bytes, of the data to be received from the
00199                                 USB device. This parameter is only required when IsNewTransfer is TRUE.
00200   @param  InterruptCallback     The Callback function. This function is called if the asynchronous
00201                                 interrupt transfer is completed. This parameter is required
00202                                 when IsNewTransfer is TRUE.
00203   @param  Context               Data passed to the InterruptCallback function. This is an optional
00204                                 parameter and may be NULL.
00205 
00206   @retval EFI_SUCCESS           The asynchronous USB transfer request transfer has been successfully executed.
00207   @retval EFI_DEVICE_ERROR      The asynchronous USB transfer request failed.
00208 
00209 **/
00210 typedef
00211 EFI_STATUS
00212 (EFIAPI *EFI_USB_IO_ASYNC_INTERRUPT_TRANSFER)(
00213   IN EFI_USB_IO_PROTOCOL                                 *This,
00214   IN UINT8                                               DeviceEndpoint,
00215   IN BOOLEAN                                             IsNewTransfer,
00216   IN UINTN                                               PollingInterval    OPTIONAL,
00217   IN UINTN                                               DataLength         OPTIONAL,
00218   IN EFI_ASYNC_USB_TRANSFER_CALLBACK                     InterruptCallBack  OPTIONAL,
00219   IN VOID                                                *Context OPTIONAL
00220   );
00221 
00222 /**
00223   This function is used to manage a USB device with an interrupt transfer pipe.
00224 
00225   @param  This                  A pointer to the EFI_USB_IO_PROTOCOL instance.
00226   @param  DeviceEndpoint        The destination USB device endpoint to which the
00227                                 device request is being sent. DeviceEndpoint must
00228                                 be between 0x01 and 0x0F or between 0x81 and 0x8F,
00229                                 otherwise EFI_INVALID_PARAMETER is returned. If
00230                                 the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER
00231                                 is returned. The MSB of this parameter indicates
00232                                 the endpoint direction. The number "1" stands for
00233                                 an IN endpoint, and "0" stands for an OUT endpoint.
00234   @param  Data                  A pointer to the buffer of data that will be transmitted to USB
00235                                 device or received from USB device.
00236   @param  DataLength            On input, then size, in bytes, of the buffer Data. On output, the
00237                                 amount of data actually transferred.
00238   @param  Timeout               The time out, in seconds, for this transfer. If Timeout is 0,
00239                                 then the caller must wait for the function to be completed
00240                                 until EFI_SUCCESS or EFI_DEVICE_ERROR is returned. If the
00241                                 transfer is not completed in this time frame, then EFI_TIMEOUT is returned.
00242   @param  Status                This parameter indicates the USB transfer status.
00243 
00244   @retval EFI_SUCCESS           The sync interrupt transfer has been successfully executed.
00245   @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
00246   @retval EFI_DEVICE_ERROR      The sync interrupt transfer request failed.
00247   @retval EFI_OUT_OF_RESOURCES  The request could not be submitted due to a lack of resources.
00248   @retval EFI_TIMEOUT           The transfer fails due to timeout.
00249 **/
00250 typedef
00251 EFI_STATUS
00252 (EFIAPI *EFI_USB_IO_SYNC_INTERRUPT_TRANSFER)(
00253   IN EFI_USB_IO_PROTOCOL            *This,
00254   IN     UINT8                      DeviceEndpoint,
00255   IN OUT VOID                       *Data,
00256   IN OUT UINTN                      *DataLength,
00257   IN     UINTN                      Timeout,
00258   OUT    UINT32                     *Status
00259   );
00260 
00261 /**
00262   This function is used to manage a USB device with an isochronous transfer pipe. An Isochronous
00263   transfer is typically used to transfer streaming data.
00264 
00265   @param  This                  A pointer to the EFI_USB_IO_PROTOCOL instance.
00266   @param  DeviceEndpoint        The destination USB device endpoint to which the
00267                                 device request is being sent. DeviceEndpoint must
00268                                 be between 0x01 and 0x0F or between 0x81 and 0x8F,
00269                                 otherwise EFI_INVALID_PARAMETER is returned. If
00270                                 the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER
00271                                 is returned. The MSB of this parameter indicates
00272                                 the endpoint direction. The number "1" stands for
00273                                 an IN endpoint, and "0" stands for an OUT endpoint.
00274   @param  Data                  A pointer to the buffer of data that will be transmitted to USB
00275                                 device or received from USB device.
00276   @param  DataLength            The size, in bytes, of the data buffer specified by Data.
00277   @param  Status                This parameter indicates the USB transfer status.
00278 
00279   @retval EFI_SUCCESS           The isochronous transfer has been successfully executed.
00280   @retval EFI_INVALID_PARAMETER The parameter DeviceEndpoint is not valid.
00281   @retval EFI_DEVICE_ERROR      The transfer failed due to the reason other than timeout, The error status
00282                                 is returned in Status.
00283   @retval EFI_OUT_OF_RESOURCES  The request could not be submitted due to a lack of resources.
00284   @retval EFI_TIMEOUT           The transfer fails due to timeout.
00285 **/
00286 typedef
00287 EFI_STATUS
00288 (EFIAPI *EFI_USB_IO_ISOCHRONOUS_TRANSFER)(
00289   IN EFI_USB_IO_PROTOCOL            *This,
00290   IN     UINT8                      DeviceEndpoint,
00291   IN OUT VOID                       *Data,
00292   IN     UINTN                      DataLength,
00293   OUT    UINT32                     *Status
00294   );
00295 
00296 /**
00297   This function is used to manage a USB device with an isochronous transfer pipe. An Isochronous
00298   transfer is typically used to transfer streaming data.
00299 
00300   @param  This                  A pointer to the EFI_USB_IO_PROTOCOL instance.
00301   @param  DeviceEndpoint        The destination USB device endpoint to which the
00302                                 device request is being sent. DeviceEndpoint must
00303                                 be between 0x01 and 0x0F or between 0x81 and 0x8F,
00304                                 otherwise EFI_INVALID_PARAMETER is returned. If
00305                                 the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER
00306                                 is returned. The MSB of this parameter indicates
00307                                 the endpoint direction. The number "1" stands for
00308                                 an IN endpoint, and "0" stands for an OUT endpoint.
00309   @param  Data                  A pointer to the buffer of data that will be transmitted to USB
00310                                 device or received from USB device.
00311   @param  DataLength            The size, in bytes, of the data buffer specified by Data.
00312                                 This is an optional parameter and may be NULL.
00313   @param  IsochronousCallback   The IsochronousCallback() function.This function is
00314                                 called if the requested isochronous transfer is completed.
00315   @param  Context               Data passed to the IsochronousCallback() function.
00316 
00317   @retval EFI_SUCCESS           The asynchronous isochronous transfer has been successfully submitted
00318                                 to the system.
00319   @retval EFI_INVALID_PARAMETER The parameter DeviceEndpoint is not valid.
00320   @retval EFI_OUT_OF_RESOURCES  The request could not be submitted due to a lack of resources.
00321 
00322 **/
00323 typedef
00324 EFI_STATUS
00325 (EFIAPI *EFI_USB_IO_ASYNC_ISOCHRONOUS_TRANSFER)(
00326   IN EFI_USB_IO_PROTOCOL              *This,
00327   IN UINT8                            DeviceEndpoint,
00328   IN OUT VOID                         *Data,
00329   IN     UINTN                        DataLength,
00330   IN EFI_ASYNC_USB_TRANSFER_CALLBACK  IsochronousCallBack,
00331   IN VOID                             *Context OPTIONAL
00332   );
00333 
00334 /**
00335   Resets and reconfigures the USB controller. This function will work for all USB devices except
00336   USB Hub Controllers.
00337 
00338   @param  This                  A pointer to the EFI_USB_IO_PROTOCOL instance.
00339 
00340   @retval EFI_SUCCESS           The USB controller was reset.
00341   @retval EFI_INVALID_PARAMETER If the controller specified by This is a USB hub.
00342   @retval EFI_DEVICE_ERROR      An error occurred during the reconfiguration process.
00343 
00344 **/
00345 typedef
00346 EFI_STATUS
00347 (EFIAPI *EFI_USB_IO_PORT_RESET)(
00348   IN EFI_USB_IO_PROTOCOL    *This
00349   );
00350 
00351 /**
00352   Retrieves the USB Device Descriptor.
00353 
00354   @param  This                  A pointer to the EFI_USB_IO_PROTOCOL instance.
00355   @param  DeviceDescriptor      A pointer to the caller allocated USB Device Descriptor.
00356 
00357   @retval EFI_SUCCESS           The device descriptor was retrieved successfully.
00358   @retval EFI_INVALID_PARAMETER DeviceDescriptor is NULL.
00359   @retval EFI_NOT_FOUND         The device descriptor was not found. The device may not be configured.
00360 
00361 **/
00362 typedef
00363 EFI_STATUS
00364 (EFIAPI *EFI_USB_IO_GET_DEVICE_DESCRIPTOR)(
00365   IN EFI_USB_IO_PROTOCOL            *This,
00366   OUT EFI_USB_DEVICE_DESCRIPTOR     *DeviceDescriptor
00367   );
00368 
00369 /**
00370   Retrieves the USB Device Descriptor.
00371 
00372   @param  This                    A pointer to the EFI_USB_IO_PROTOCOL instance.
00373   @param  ConfigurationDescriptor A pointer to the caller allocated USB Active Configuration
00374                                   Descriptor.
00375   @retval EFI_SUCCESS             The active configuration descriptor was retrieved successfully.
00376   @retval EFI_INVALID_PARAMETER   ConfigurationDescriptor is NULL.
00377   @retval EFI_NOT_FOUND           An active configuration descriptor cannot be found. The device may not
00378                                   be configured.
00379 
00380 **/
00381 typedef
00382 EFI_STATUS
00383 (EFIAPI *EFI_USB_IO_GET_CONFIG_DESCRIPTOR)(
00384   IN EFI_USB_IO_PROTOCOL            *This,
00385   OUT EFI_USB_CONFIG_DESCRIPTOR     *ConfigurationDescriptor
00386   );
00387 
00388 /**
00389   Retrieves the Interface Descriptor for a USB Device Controller. As stated earlier, an interface
00390   within a USB device is equivalently to a USB Controller within the current configuration.
00391 
00392   @param  This                    A pointer to the EFI_USB_IO_PROTOCOL instance.
00393   @param  InterfaceDescriptor     A pointer to the caller allocated USB Interface Descriptor within
00394                                   the configuration setting.
00395   @retval EFI_SUCCESS             The interface descriptor retrieved successfully.
00396   @retval EFI_INVALID_PARAMETER   InterfaceDescriptor is NULL.
00397   @retval EFI_NOT_FOUND           The interface descriptor cannot be found. The device may not be
00398                                   correctly configured.
00399 
00400 **/
00401 typedef
00402 EFI_STATUS
00403 (EFIAPI *EFI_USB_IO_GET_INTERFACE_DESCRIPTOR)(
00404   IN EFI_USB_IO_PROTOCOL            *This,
00405   OUT EFI_USB_INTERFACE_DESCRIPTOR  *InterfaceDescriptor
00406   );
00407 
00408 /**
00409   Retrieves an Endpoint Descriptor within a USB Controller.
00410 
00411   @param  This                    A pointer to the EFI_USB_IO_PROTOCOL instance.
00412   @param  EndpointIndex           Indicates which endpoint descriptor to retrieve.
00413   @param  EndpointDescriptor      A pointer to the caller allocated USB Endpoint Descriptor of
00414                                   a USB controller.
00415 
00416   @retval EFI_SUCCESS             The endpoint descriptor was retrieved successfully.
00417   @retval EFI_INVALID_PARAMETER   One or more parameters are invalid.
00418   @retval EFI_NOT_FOUND           The endpoint descriptor cannot be found. The device may not be
00419                                   correctly configured.
00420 
00421 **/
00422 typedef
00423 EFI_STATUS
00424 (EFIAPI *EFI_USB_IO_GET_ENDPOINT_DESCRIPTOR)(
00425   IN EFI_USB_IO_PROTOCOL            *This,
00426   IN  UINT8                         EndpointIndex,
00427   OUT EFI_USB_ENDPOINT_DESCRIPTOR   *EndpointDescriptor
00428   );
00429 
00430 /**
00431   Retrieves a string stored in a USB Device.
00432 
00433   @param  This                    A pointer to the EFI_USB_IO_PROTOCOL instance.
00434   @param  LangID                  The Language ID for the string being retrieved.
00435   @param  StringID                The ID of the string being retrieved.
00436   @param  String                  A pointer to a buffer allocated by this function with
00437                                   AllocatePool() to store the string.If this function
00438                                   returns EFI_SUCCESS, it stores the string the caller
00439                                   wants to get. The caller should release the string
00440                                   buffer with FreePool() after the string is not used any more.
00441 
00442   @retval EFI_SUCCESS             The string was retrieved successfully.
00443   @retval EFI_NOT_FOUND           The string specified by LangID and StringID was not found.
00444   @retval EFI_OUT_OF_RESOURCES    There are not enough resources to allocate the return buffer String.
00445 
00446 **/
00447 typedef
00448 EFI_STATUS
00449 (EFIAPI *EFI_USB_IO_GET_STRING_DESCRIPTOR)(
00450   IN EFI_USB_IO_PROTOCOL            *This,
00451   IN  UINT16                        LangID,
00452   IN  UINT8                         StringID,
00453   OUT CHAR16                        **String
00454   );
00455 
00456 /**
00457   Retrieves all the language ID codes that the USB device supports.
00458 
00459   @param  This                    A pointer to the EFI_USB_IO_PROTOCOL instance.
00460   @param  LangIDTable             Language ID for the string the caller wants to get.
00461                                   This is a 16-bit ID defined by Microsoft. This
00462                                   buffer pointer is allocated and maintained by
00463                                   the USB Bus Driver, the caller should not modify
00464                                   its contents.
00465   @param  TableSize               The size, in bytes, of the table LangIDTable.
00466 
00467   @retval EFI_SUCCESS             The support languages were retrieved successfully.
00468 
00469 **/
00470 typedef
00471 EFI_STATUS
00472 (EFIAPI *EFI_USB_IO_GET_SUPPORTED_LANGUAGE)(
00473   IN EFI_USB_IO_PROTOCOL            *This,
00474   OUT UINT16                        **LangIDTable,
00475   OUT UINT16                        *TableSize
00476   );
00477 
00478 ///
00479 /// The EFI_USB_IO_PROTOCOL provides four basic transfers types described
00480 /// in the USB 1.1 Specification. These include control transfer, interrupt
00481 /// transfer, bulk transfer and isochronous transfer. The EFI_USB_IO_PROTOCOL
00482 /// also provides some basic USB device/controller management and configuration
00483 /// interfaces. A USB device driver uses the services of this protocol to manage USB devices.
00484 ///
00485 struct _EFI_USB_IO_PROTOCOL {
00486   //
00487   // IO transfer
00488   //
00489   EFI_USB_IO_CONTROL_TRANSFER           UsbControlTransfer;
00490   EFI_USB_IO_BULK_TRANSFER              UsbBulkTransfer;
00491   EFI_USB_IO_ASYNC_INTERRUPT_TRANSFER   UsbAsyncInterruptTransfer;
00492   EFI_USB_IO_SYNC_INTERRUPT_TRANSFER    UsbSyncInterruptTransfer;
00493   EFI_USB_IO_ISOCHRONOUS_TRANSFER       UsbIsochronousTransfer;
00494   EFI_USB_IO_ASYNC_ISOCHRONOUS_TRANSFER UsbAsyncIsochronousTransfer;
00495 
00496   //
00497   // Common device request
00498   //
00499   EFI_USB_IO_GET_DEVICE_DESCRIPTOR      UsbGetDeviceDescriptor;
00500   EFI_USB_IO_GET_CONFIG_DESCRIPTOR      UsbGetConfigDescriptor;
00501   EFI_USB_IO_GET_INTERFACE_DESCRIPTOR   UsbGetInterfaceDescriptor;
00502   EFI_USB_IO_GET_ENDPOINT_DESCRIPTOR    UsbGetEndpointDescriptor;
00503   EFI_USB_IO_GET_STRING_DESCRIPTOR      UsbGetStringDescriptor;
00504   EFI_USB_IO_GET_SUPPORTED_LANGUAGE     UsbGetSupportedLanguages;
00505 
00506   //
00507   // Reset controller's parent port
00508   //
00509   EFI_USB_IO_PORT_RESET                 UsbPortReset;
00510 };
00511 
00512 extern EFI_GUID gEfiUsbIoProtocolGuid;
00513 
00514 #endif