2 Copyright (c) 2006, Intel Corporation
3 All rights reserved. This program and the accompanying materials
4 are licensed and made available under the terms and conditions of the BSD License
5 which accompanies this distribution. The full text of the license may be found at
6 http://opensource.org/licenses/bsd-license.php
8 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
9 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 Header file for USB bus driver Interface
25 #ifndef _EFI_USB_BUS_H
26 #define _EFI_USB_BUS_H
29 #include <IndustryStandard/Usb.h>
33 extern UINTN gUSBDebugLevel
;
34 extern UINTN gUSBErrorLevel
;
36 #define MICROSECOND 10000
37 #define ONESECOND (1000 * MICROSECOND)
38 #define BUSPOLLING_PERIOD ONESECOND
40 // We define some maximun value here
42 #define USB_MAXCONFIG 8
43 #define USB_MAXALTSETTING 4
44 #define USB_MAXINTERFACES 32
45 #define USB_MAXENDPOINTS 16
46 #define USB_MAXSTRINGS 16
47 #define USB_MAXLANID 16
48 #define USB_MAXCHILDREN 8
49 #define USB_MAXCONTROLLERS 4
51 #define USB_IO_CONTROLLER_SIGNATURE EFI_SIGNATURE_32 ('u', 's', 'b', 'd')
62 EFI_USB_ENDPOINT_DESCRIPTOR EndpointDescriptor
;
63 } ENDPOINT_DESC_LIST_ENTRY
;
67 EFI_USB_INTERFACE_DESCRIPTOR InterfaceDescriptor
;
68 LIST_ENTRY EndpointDescListHead
;
69 } INTERFACE_DESC_LIST_ENTRY
;
73 EFI_USB_CONFIG_DESCRIPTOR CongfigDescriptor
;
74 LIST_ENTRY InterfaceDescListHead
;
75 UINTN ActiveInterface
;
76 } CONFIG_DESC_LIST_ENTRY
;
84 // This is used to form the USB Controller Handle
86 typedef struct usb_io_controller_device
{
89 EFI_USB_IO_PROTOCOL UsbIo
;
90 EFI_DEVICE_PATH_PROTOCOL
*DevicePath
;
91 EFI_HANDLE HostController
;
92 UINT8 CurrentConfigValue
;
93 UINT8 InterfaceNumber
;
94 struct usb_io_device
*UsbDevice
;
97 BOOLEAN IsManagedByDriver
;
100 // Fields specified for USB Hub
103 UINT8 HubEndpointAddress
;
104 UINT8 StatusChangePort
;
105 UINT8 DownstreamPorts
;
108 struct usb_io_controller_device
*Parent
;
109 struct usb_io_device
*Children
[USB_MAXCHILDREN
];
110 } USB_IO_CONTROLLER_DEVICE
;
112 #define USB_IO_CONTROLLER_DEVICE_FROM_USB_IO_THIS(a) \
113 CR(a, USB_IO_CONTROLLER_DEVICE, UsbIo, USB_IO_CONTROLLER_SIGNATURE)
116 // This is used to keep the topology of USB bus
118 struct _usb_bus_controller_device
;
120 typedef struct usb_io_device
{
122 BOOLEAN IsConfigured
;
123 BOOLEAN IsSlowDevice
;
125 EFI_USB2_HC_TRANSACTION_TRANSLATOR
*Translator
;
126 EFI_USB_DEVICE_DESCRIPTOR DeviceDescriptor
;
127 LIST_ENTRY ConfigDescListHead
;
128 CONFIG_DESC_LIST_ENTRY
*ActiveConfig
;
129 UINT16 LangID
[USB_MAXLANID
];
131 struct _usb_bus_controller_device
*BusController
;
134 // Track the controller handle
136 UINT8 NumOfControllers
;
137 USB_IO_CONTROLLER_DEVICE
*UsbController
[USB_MAXCONTROLLERS
];
142 // Usb Bus Controller device strcuture
144 #define EFI_USB_BUS_PROTOCOL_GUID \
145 { 0x2B2F68CC, 0x0CD2, 0x44cf, { 0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75 } }
147 typedef struct _EFI_USB_BUS_PROTOCOL
{
149 } EFI_USB_BUS_PROTOCOL
;
151 #define USB_BUS_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('u', 'b', 'u', 's')
153 typedef struct _usb_bus_controller_device
{
156 EFI_USB_BUS_PROTOCOL BusIdentify
;
157 EFI_USB2_HC_PROTOCOL
*Usb2HCInterface
;
158 EFI_USB_HC_PROTOCOL
*UsbHCInterface
;
159 EFI_DEVICE_PATH_PROTOCOL
*DevicePath
;
160 UINT8 AddressPool
[16];
162 BOOLEAN Hc2ProtocolSupported
;
163 } USB_BUS_CONTROLLER_DEVICE
;
165 #define USB_BUS_CONTROLLER_DEVICE_FROM_THIS(a) \
166 CR(a, USB_BUS_CONTROLLER_DEVICE, BusIdentify, USB_BUS_DEVICE_SIGNATURE)
172 extern EFI_DRIVER_BINDING_PROTOCOL gUsbBusDriverBinding
;
173 extern EFI_COMPONENT_NAME_PROTOCOL gUsbBusComponentName
;
174 extern EFI_GUID gUSBBusDriverGuid
;
177 // Usb Device Configuration functions
181 IN USB_IO_CONTROLLER_DEVICE
*Dev
186 Tell if a usb controller is a hub controller.
189 Dev - UsbIoController device structure.
198 IN USB_IO_DEVICE
*UsbIoDevice
203 Get the string table stored in a usb device.
206 Dev - UsbIoController device structure.
217 UsbGetAllConfigurations (
218 IN USB_IO_DEVICE
*UsbIoDevice
223 This function is to parse all the configuration descriptor.
226 UsbIoDevice - USB_IO_DEVICE device structure.
237 UsbSetConfiguration (
238 IN USB_IO_DEVICE
*Dev
,
239 IN UINTN ConfigurationValue
244 Set the device to a configuration value.
247 UsbIoDev - USB_IO_DEVICE to be set configuration
248 ConfigrationValue - The configuration value to be set to that device
258 UsbSetDefaultConfiguration (
259 IN USB_IO_DEVICE
*Dev
264 Set the device to a default configuration value.
267 UsbIoDev - USB_IO_DEVICE to be set configuration
277 // Device Deconfiguration functions
280 UsbDestroyAllConfiguration (
281 IN USB_IO_DEVICE
*UsbIoDevice
286 Delete all configuration data when device is not used.
289 UsbIoDevice - USB_IO_DEVICE to be set configuration
299 IN USB_IO_CONTROLLER_DEVICE
*HubIoDevice
307 HubController - Indicating the hub controller device that
319 GetDeviceEndPointMaxPacketLength (
320 IN EFI_USB_IO_PROTOCOL
*UsbIo
,
321 IN UINT8 EndpointAddr
,
322 OUT UINTN
*MaxPacketLength
327 Get the Max Packet Length of the speified Endpoint.
330 UsbIo - Given Usb Controller device.
331 EndpointAddr - Given Endpoint address.
332 MaxPacketLength - The max packet length of that endpoint
342 IN EFI_USB_IO_PROTOCOL
*UsbIo
,
343 IN UINT8 EndpointAddr
,
344 OUT UINT8
*DataToggle
349 Get the datatoggle of a specified endpoint.
352 UsbIo - Given Usb Controller device.
353 EndpointAddr - Given Endpoint address.
354 DataToggle - The current data toggle of that endpoint
364 IN EFI_USB_IO_PROTOCOL
*UsbIo
,
365 IN UINT8 EndpointAddr
,
371 Set the datatoggle of a specified endpoint
374 UsbIo - Given Usb Controller device.
375 EndpointAddr - Given Endpoint address.
376 DataToggle - The current data toggle of that endpoint to be set
384 INTERFACE_DESC_LIST_ENTRY
*
385 FindInterfaceListEntry (
386 IN EFI_USB_IO_PROTOCOL
*This
391 Find Interface ListEntry.
394 This - EFI_USB_IO_PROTOCOL
397 INTERFACE_DESC_LIST_ENTRY pointer
402 ENDPOINT_DESC_LIST_ENTRY
*
403 FindEndPointListEntry (
404 IN EFI_USB_IO_PROTOCOL
*This
,
405 IN UINT8 EndPointAddress
410 Find EndPoint ListEntry.
413 This - EFI_USB_IO_PROTOCOL
414 EndpointAddr - Endpoint address.
417 ENDPOINT_DESC_LIST_ENTRY pointer
423 IsDeviceDisconnected (
424 IN USB_IO_CONTROLLER_DEVICE
*UsbIoController
,
425 IN OUT BOOLEAN
*Disconnected
430 Reset if the device is disconencted or not
433 UsbIoController - Indicating the Usb Controller Device.
434 Disconnected - Indicate whether the device is disconencted or not
444 UsbDeviceDeConfiguration (
445 IN USB_IO_DEVICE
*UsbIoDevice
450 Remove Device, Device Handles, Uninstall Protocols.
453 UsbIoDevice - The device to be deconfigured.
464 UsbVirtualHcGetCapability (
465 IN USB_BUS_CONTROLLER_DEVICE
*UsbBusDev
,
467 OUT UINT8
*PortNumber
,
468 OUT UINT8
*Is64BitCapable
474 Virtual interface to Retrieves the capablility of root hub ports
475 for both Hc2 and Hc protocol.
479 UsbBusDev - A pointer to bus controller of the device.
480 MaxSpeed - A pointer to the number of the host controller.
481 PortNumber - A pointer to the number of the root hub ports.
482 Is64BitCapable - A pointer to the flag for whether controller supports
483 64-bit memory addressing.
488 The host controller capability were retrieved successfully.
489 EFI_INVALID_PARAMETER
490 MaxSpeed or PortNumber or Is64BitCapable is NULL.
492 An error was encountered while attempting to retrieve the capabilities.
500 IN USB_BUS_CONTROLLER_DEVICE
*UsbBusDev
,
507 Virtual interface to provides software reset for the USB host controller
508 for both Hc2 and Hc protocol.
512 UsbBusDev - A pointer to bus controller of the device.
513 Attributes - A bit mask of the reset operation to perform.
514 See below for a list of the supported bit mask values.
516 #define EFI_USB_HC_RESET_GLOBAL 0x0001 // Hc2 and Hc
517 #define EFI_USB_HC_RESET_HOST_CONTROLLER 0x0002 // Hc2 and Hc
518 #define EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG 0x0004 // Hc2
519 #define EFI_USB_HC_RESET_HOST_WITH_DEBUG 0x0008 // Hc2
521 EFI_USB_HC_RESET_GLOBAL
522 If this bit is set, a global reset signal will be sent to the USB bus.
523 This resets all of the USB bus logic, including the USB host
524 controller hardware and all the devices attached on the USB bus.
525 EFI_USB_HC_RESET_HOST_CONTROLLER
526 If this bit is set, the USB host controller hardware will be reset.
527 No reset signal will be sent to the USB bus.
528 EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG
529 If this bit is set, a global reset signal will be sent to the USB bus.
530 This resets all of the USB bus logic, including the USB host
531 controller hardware and all the devices attached on the USB bus.
532 If this is an EHCI controller and the debug port has configured, then
533 this is will still reset the host controller.
534 EFI_USB_HC_RESET_HOST_WITH_DEBUG
535 If this bit is set, the USB host controller hardware will be reset.
536 If this is an EHCI controller and the debug port has been configured,
537 then this will still reset the host controller.
542 The reset operation succeeded.
543 EFI_INVALID_PARAMETER
544 Attributes is not valid.
546 The type of reset specified by Attributes is not currently supported by
547 the host controller hardware.
549 Reset operation is rejected due to the debug port being configured and
550 active; only EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG or
551 EFI_USB_HC_RESET_HOST_WITH_DEBUG reset Atrributes can be used to
552 perform reset operation for this host controller.
554 An error was encountered while attempting to perform
562 UsbVirtualHcGetState (
563 IN USB_BUS_CONTROLLER_DEVICE
*UsbBusDev
,
564 OUT EFI_USB_HC_STATE
*State
570 Virtual interface to retrieves current state of the USB host controller
571 for both Hc2 and Hc protocol.
575 UsbBusDev - A pointer to bus controller of the device.
576 State - A pointer to the EFI_USB_HC_STATE data structure that
577 indicates current state of the USB host controller.
578 Type EFI_USB_HC_STATE is defined below.
582 EfiUsbHcStateOperational,
583 EfiUsbHcStateSuspend,
590 The state information of the host controller was returned in State.
591 EFI_INVALID_PARAMETER
594 An error was encountered while attempting to retrieve the
595 host controller's current state.
602 UsbVirtualHcSetState (
603 IN USB_BUS_CONTROLLER_DEVICE
*UsbBusDev
,
604 IN EFI_USB_HC_STATE State
610 Virtual interface to sets the USB host controller to a specific state
611 for both Hc2 and Hc protocol.
615 UsbBusDev - A pointer to bus controller of the device.
616 State - Indicates the state of the host controller that will be set.
621 The USB host controller was successfully placed in the state
623 EFI_INVALID_PARAMETER
626 Failed to set the state specified by State due to device error.
633 UsbVirtualHcGetRootHubPortStatus (
634 IN USB_BUS_CONTROLLER_DEVICE
*UsbBusDev
,
636 OUT EFI_USB_PORT_STATUS
*PortStatus
642 Virtual interface to retrieves the current status of a USB root hub port
643 both for Hc2 and Hc protocol.
647 UsbBusDev - A pointer to bus controller of the device.
648 PortNumber - Specifies the root hub port from which the status
649 is to be retrieved. This value is zero-based. For example,
650 if a root hub has two ports, then the first port is numbered 0,
651 and the second port is numbered 1.
652 PortStatus - A pointer to the current port status bits and
653 port status change bits.
657 EFI_SUCCESS The status of the USB root hub port specified by PortNumber
658 was returned in PortStatus.
659 EFI_INVALID_PARAMETER PortNumber is invalid.
660 EFI_DEVICE_ERROR Can't read register
667 UsbVirtualHcSetRootHubPortFeature (
668 IN USB_BUS_CONTROLLER_DEVICE
*UsbBusDev
,
670 IN EFI_USB_PORT_FEATURE PortFeature
675 Virual interface to sets a feature for the specified root hub port
676 for both Hc2 and Hc protocol.
680 UsbBusDev - A pointer to bus controller of the device.
681 PortNumber - Specifies the root hub port whose feature
682 is requested to be set.
683 PortFeature - Indicates the feature selector associated
684 with the feature set request.
689 The feature specified by PortFeature was set for the
690 USB root hub port specified by PortNumber.
691 EFI_INVALID_PARAMETER
692 PortNumber is invalid or PortFeature is invalid.
701 UsbVirtualHcClearRootHubPortFeature (
702 IN USB_BUS_CONTROLLER_DEVICE
*UsbBusDev
,
704 IN EFI_USB_PORT_FEATURE PortFeature
710 Virtual interface to clears a feature for the specified root hub port
711 for both Hc2 and Hc protocol.
715 UsbBusDev - A pointer to bus controller of the device.
716 PortNumber - Specifies the root hub port whose feature
717 is requested to be cleared.
718 PortFeature - Indicates the feature selector associated with the
719 feature clear request.
724 The feature specified by PortFeature was cleared for the
725 USB root hub port specified by PortNumber.
726 EFI_INVALID_PARAMETER
727 PortNumber is invalid or PortFeature is invalid.
736 UsbVirtualHcControlTransfer (
737 IN USB_BUS_CONTROLLER_DEVICE
*UsbBusDev
,
738 IN UINT8 DeviceAddress
,
739 IN UINT8 DeviceSpeed
,
740 IN UINTN MaximumPacketLength
,
741 IN EFI_USB_DEVICE_REQUEST
*Request
,
742 IN EFI_USB_DATA_DIRECTION TransferDirection
,
744 IN OUT UINTN
*DataLength
,
746 IN EFI_USB2_HC_TRANSACTION_TRANSLATOR
*Translator
,
747 OUT UINT32
*TransferResult
753 Virtual interface to submits control transfer to a target USB device
754 for both Hc2 and Hc protocol.
758 UsbBusDev - A pointer to bus controller of the device.
759 DeviceAddress - Represents the address of the target device on the USB,
760 which is assigned during USB enumeration.
761 DeviceSpeed - Indicates target device speed.
762 MaximumPacketLength - Indicates the maximum packet size that the
763 default control transfer endpoint is capable of
764 sending or receiving.
765 Request - A pointer to the USB device request that will be sent
767 TransferDirection - Specifies the data direction for the transfer.
768 There are three values available, DataIn, DataOut
770 Data - A pointer to the buffer of data that will be transmitted
771 to USB device or received from USB device.
772 DataLength - Indicates the size, in bytes, of the data buffer
774 TimeOut - Indicates the maximum time, in microseconds,
775 which the transfer is allowed to complete.
776 Translator - A pointr to the transaction translator data.
777 TransferResult - A pointer to the detailed result information generated
778 by this control transfer.
783 The control transfer was completed successfully.
785 The control transfer could not be completed due to a lack of resources.
786 EFI_INVALID_PARAMETER
787 Some parameters are invalid.
789 The control transfer failed due to timeout.
791 The control transfer failed due to host controller or device error.
792 Caller should check TranferResult for detailed error information.
799 UsbVirtualHcBulkTransfer (
800 IN USB_BUS_CONTROLLER_DEVICE
*UsbBusDev
,
801 IN UINT8 DeviceAddress
,
802 IN UINT8 EndPointAddress
,
803 IN UINT8 DeviceSpeed
,
804 IN UINTN MaximumPacketLength
,
805 IN UINT8 DataBuffersNumber
,
806 IN OUT VOID
*Data
[EFI_USB_MAX_BULK_BUFFER_NUM
],
807 IN OUT UINTN
*DataLength
,
808 IN OUT UINT8
*DataToggle
,
810 IN EFI_USB2_HC_TRANSACTION_TRANSLATOR
*Translator
,
811 OUT UINT32
*TransferResult
817 Virtual interface to submits bulk transfer to a bulk endpoint of a USB device
818 both for Hc2 and Hc protocol.
822 UsbBusDev - A pointer to bus controller of the device.
823 DeviceAddress - Represents the address of the target device on the USB,
824 which is assigned during USB enumeration.
825 EndPointAddress - The combination of an endpoint number and an
826 endpoint direction of the target USB device.
827 Each endpoint address supports data transfer in
828 one direction except the control endpoint
829 (whose default endpoint address is 0).
830 It is the caller's responsibility to make sure that
831 the EndPointAddress represents a bulk endpoint.
832 DeviceSpeed - Indicates device speed. The supported values are EFI_USB_SPEED_FULL
833 and EFI_USB_SPEED_HIGH.
834 MaximumPacketLength - Indicates the maximum packet size the target endpoint
835 is capable of sending or receiving.
836 DataBuffersNumber - Number of data buffers prepared for the transfer.
837 Data - Array of pointers to the buffers of data that will be transmitted
838 to USB device or received from USB device.
839 DataLength - When input, indicates the size, in bytes, of the data buffer
840 specified by Data. When output, indicates the actually
841 transferred data size.
842 DataToggle - A pointer to the data toggle value. On input, it indicates
843 the initial data toggle value the bulk transfer should adopt;
844 on output, it is updated to indicate the data toggle value
845 of the subsequent bulk transfer.
846 Translator - A pointr to the transaction translator data.
847 TimeOut - Indicates the maximum time, in microseconds, which the
848 transfer is allowed to complete.
849 TransferResult - A pointer to the detailed result information of the
855 The bulk transfer was completed successfully.
857 The bulk transfer could not be submitted due to lack of resource.
858 EFI_INVALID_PARAMETER
859 Some parameters are invalid.
861 The bulk transfer failed due to timeout.
863 The bulk transfer failed due to host controller or device error.
864 Caller should check TranferResult for detailed error information.
871 UsbVirtualHcAsyncInterruptTransfer (
872 IN USB_BUS_CONTROLLER_DEVICE
* UsbBusDev
,
873 IN UINT8 DeviceAddress
,
874 IN UINT8 EndPointAddress
,
875 IN UINT8 DeviceSpeed
,
876 IN UINTN MaximumPacketLength
,
877 IN BOOLEAN IsNewTransfer
,
878 IN OUT UINT8
*DataToggle
,
879 IN UINTN PollingInterval
,
881 IN EFI_USB2_HC_TRANSACTION_TRANSLATOR
* Translator
,
882 IN EFI_ASYNC_USB_TRANSFER_CALLBACK CallBackFunction
,
883 IN VOID
*Context OPTIONAL
889 Virtual interface to submits an asynchronous interrupt transfer to an
890 interrupt endpoint of a USB device for both Hc2 and Hc protocol.
894 UsbBusDev - A pointer to bus controller of the device.
895 DeviceAddress - Represents the address of the target device on the USB,
896 which is assigned during USB enumeration.
897 EndPointAddress - The combination of an endpoint number and an endpoint
898 direction of the target USB device. Each endpoint address
899 supports data transfer in one direction except the
900 control endpoint (whose default endpoint address is 0).
901 It is the caller's responsibility to make sure that
902 the EndPointAddress represents an interrupt endpoint.
903 DeviceSpeed - Indicates device speed.
904 MaximumPacketLength - Indicates the maximum packet size the target endpoint
905 is capable of sending or receiving.
906 IsNewTransfer - If TRUE, an asynchronous interrupt pipe is built between
907 the host and the target interrupt endpoint.
908 If FALSE, the specified asynchronous interrupt pipe
910 DataToggle - A pointer to the data toggle value. On input, it is valid
911 when IsNewTransfer is TRUE, and it indicates the initial
912 data toggle value the asynchronous interrupt transfer
914 On output, it is valid when IsNewTransfer is FALSE,
915 and it is updated to indicate the data toggle value of
916 the subsequent asynchronous interrupt transfer.
917 PollingInterval - Indicates the interval, in milliseconds, that the
918 asynchronous interrupt transfer is polled.
919 This parameter is required when IsNewTransfer is TRUE.
920 DataLength - Indicates the length of data to be received at the
921 rate specified by PollingInterval from the target
922 asynchronous interrupt endpoint. This parameter
923 is only required when IsNewTransfer is TRUE.
924 Translator - A pointr to the transaction translator data.
925 CallBackFunction - The Callback function.This function is called at the
926 rate specified by PollingInterval.This parameter is
927 only required when IsNewTransfer is TRUE.
928 Context - The context that is passed to the CallBackFunction.
929 - This is an optional parameter and may be NULL.
934 The asynchronous interrupt transfer request has been successfully
935 submitted or canceled.
936 EFI_INVALID_PARAMETER
937 Some parameters are invalid.
939 The request could not be completed due to a lack of resources.
948 UsbVirtualHcSyncInterruptTransfer (
949 IN USB_BUS_CONTROLLER_DEVICE
*UsbBusDev
,
950 IN UINT8 DeviceAddress
,
951 IN UINT8 EndPointAddress
,
952 IN UINT8 DeviceSpeed
,
953 IN UINTN MaximumPacketLength
,
955 IN OUT UINTN
*DataLength
,
956 IN OUT UINT8
*DataToggle
,
958 IN EFI_USB2_HC_TRANSACTION_TRANSLATOR
*Translator
,
959 OUT UINT32
*TransferResult
965 Vitual interface to submits synchronous interrupt transfer to an interrupt endpoint
966 of a USB device for both Hc2 and Hc protocol.
970 UsbBusDev - A pointer to bus controller of the device.
971 DeviceAddress - Represents the address of the target device on the USB,
972 which is assigned during USB enumeration.
973 EndPointAddress - The combination of an endpoint number and an endpoint
974 direction of the target USB device. Each endpoint
975 address supports data transfer in one direction
976 except the control endpoint (whose default
977 endpoint address is 0). It is the caller's responsibility
978 to make sure that the EndPointAddress represents
979 an interrupt endpoint.
980 DeviceSpeed - Indicates device speed.
981 MaximumPacketLength - Indicates the maximum packet size the target endpoint
982 is capable of sending or receiving.
983 Data - A pointer to the buffer of data that will be transmitted
984 to USB device or received from USB device.
985 DataLength - On input, the size, in bytes, of the data buffer specified
986 by Data. On output, the number of bytes transferred.
987 DataToggle - A pointer to the data toggle value. On input, it indicates
988 the initial data toggle value the synchronous interrupt
989 transfer should adopt;
990 on output, it is updated to indicate the data toggle value
991 of the subsequent synchronous interrupt transfer.
992 TimeOut - Indicates the maximum time, in microseconds, which the
993 transfer is allowed to complete.
994 Translator - A pointr to the transaction translator data.
995 TransferResult - A pointer to the detailed result information from
996 the synchronous interrupt transfer.
1001 The synchronous interrupt transfer was completed successfully.
1002 EFI_OUT_OF_RESOURCES
1003 The synchronous interrupt transfer could not be submitted due
1004 to lack of resource.
1005 EFI_INVALID_PARAMETER
1006 Some parameters are invalid.
1008 The synchronous interrupt transfer failed due to timeout.
1010 The synchronous interrupt transfer failed due to host controller
1011 or device error. Caller should check TranferResult for detailed
1019 UsbVirtualHcIsochronousTransfer (
1020 IN USB_BUS_CONTROLLER_DEVICE
*UsbBusDev
,
1021 IN UINT8 DeviceAddress
,
1022 IN UINT8 EndPointAddress
,
1023 IN UINT8 DeviceSpeed
,
1024 IN UINTN MaximumPacketLength
,
1025 IN UINT8 DataBuffersNumber
,
1026 IN OUT VOID
*Data
[EFI_USB_MAX_ISO_BUFFER_NUM
],
1027 IN UINTN DataLength
,
1028 IN EFI_USB2_HC_TRANSACTION_TRANSLATOR
*Translator
,
1029 OUT UINT32
*TransferResult
1033 Routine Description:
1035 Virtual interface to submits isochronous transfer to a target USB device
1036 for both Hc2 and Hc protocol.
1040 UsbBusDev - A pointer to bus controller of the device.
1041 DeviceAddress - Represents the address of the target device on the USB,
1042 which is assigned during USB enumeration.
1043 EndPointAddress - End point address
1044 DeviceSpeed - Indicates device speed.
1045 MaximumPacketLength - Indicates the maximum packet size that the
1046 default control transfer endpoint is capable of
1047 sending or receiving.
1048 DataBuffersNumber - Number of data buffers prepared for the transfer.
1049 Data - Array of pointers to the buffers of data that will be
1050 transmitted to USB device or received from USB device.
1051 DataLength - Indicates the size, in bytes, of the data buffer
1053 Translator - A pointr to the transaction translator data.
1054 TransferResult - A pointer to the detailed result information generated
1055 by this control transfer.
1066 UsbVirtualHcAsyncIsochronousTransfer (
1067 IN USB_BUS_CONTROLLER_DEVICE
*UsbBusDev
,
1068 IN UINT8 DeviceAddress
,
1069 IN UINT8 EndPointAddress
,
1070 IN UINT8 DeviceSpeed
,
1071 IN UINTN MaximumPacketLength
,
1072 IN UINT8 DataBuffersNumber
,
1073 IN OUT VOID
*Data
[EFI_USB_MAX_ISO_BUFFER_NUM
],
1074 IN UINTN DataLength
,
1075 IN EFI_USB2_HC_TRANSACTION_TRANSLATOR
*Translator
,
1076 IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack
,
1081 Routine Description:
1083 Vitual interface to submits Async isochronous transfer to a target USB device
1084 for both Hc2 and Hc protocol.
1088 UsbBusDev - A pointer to bus controller of the device.
1089 DeviceAddress - Represents the address of the target device on the USB,
1090 which is assigned during USB enumeration.
1091 EndPointAddress - End point address
1092 DeviceSpeed - Indicates device speed.
1093 MaximumPacketLength - Indicates the maximum packet size that the
1094 default control transfer endpoint is capable of
1095 sending or receiving.
1096 DataBuffersNumber - Number of data buffers prepared for the transfer.
1097 Data - Array of pointers to the buffers of data that will be transmitted
1098 to USB device or received from USB device.
1099 DataLength - Indicates the size, in bytes, of the data buffer
1101 Translator - A pointr to the transaction translator data.
1102 IsochronousCallBack - When the transfer complete, the call back function will be called
1103 Context - Pass to the call back function as parameter