TianoCore EDK2 master
|
Go to the source code of this file.
Functions | |
EFI_STATUS | UsbHcGetCapability (IN USB_BUS *UsbBus, OUT UINT8 *MaxSpeed, OUT UINT8 *NumOfPort, OUT UINT8 *Is64BitCapable) |
EFI_STATUS | UsbHcGetRootHubPortStatus (IN USB_BUS *UsbBus, IN UINT8 PortIndex, OUT EFI_USB_PORT_STATUS *PortStatus) |
EFI_STATUS | UsbHcSetRootHubPortFeature (IN USB_BUS *UsbBus, IN UINT8 PortIndex, IN EFI_USB_PORT_FEATURE Feature) |
EFI_STATUS | UsbHcClearRootHubPortFeature (IN USB_BUS *UsbBus, IN UINT8 PortIndex, IN EFI_USB_PORT_FEATURE Feature) |
EFI_STATUS | UsbHcControlTransfer (IN USB_BUS *UsbBus, IN UINT8 DevAddr, IN UINT8 DevSpeed, IN UINTN MaxPacket, IN EFI_USB_DEVICE_REQUEST *Request, IN EFI_USB_DATA_DIRECTION Direction, IN OUT VOID *Data, IN OUT UINTN *DataLength, IN UINTN TimeOut, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *UsbResult) |
EFI_STATUS | UsbHcBulkTransfer (IN USB_BUS *UsbBus, IN UINT8 DevAddr, IN UINT8 EpAddr, IN UINT8 DevSpeed, IN UINTN MaxPacket, IN UINT8 BufferNum, IN OUT VOID *Data[], IN OUT UINTN *DataLength, IN OUT UINT8 *DataToggle, IN UINTN TimeOut, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *UsbResult) |
EFI_STATUS | UsbHcAsyncInterruptTransfer (IN USB_BUS *UsbBus, IN UINT8 DevAddr, IN UINT8 EpAddr, IN UINT8 DevSpeed, IN UINTN MaxPacket, IN BOOLEAN IsNewTransfer, IN OUT UINT8 *DataToggle, IN UINTN PollingInterval, IN UINTN DataLength, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, IN EFI_ASYNC_USB_TRANSFER_CALLBACK Callback, IN VOID *Context OPTIONAL) |
EFI_STATUS | UsbHcSyncInterruptTransfer (IN USB_BUS *UsbBus, IN UINT8 DevAddr, IN UINT8 EpAddr, IN UINT8 DevSpeed, IN UINTN MaxPacket, IN OUT VOID *Data, IN OUT UINTN *DataLength, IN OUT UINT8 *DataToggle, IN UINTN TimeOut, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *UsbResult) |
EFI_STATUS | UsbOpenHostProtoByChild (IN USB_BUS *Bus, IN EFI_HANDLE Child) |
VOID | UsbCloseHostProtoByChild (IN USB_BUS *Bus, IN EFI_HANDLE Child) |
EFI_TPL | UsbGetCurrentTpl (VOID) |
Manage Usb Port/Hc/Etc.
Copyright (c) 2007, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file UsbUtility.h.
VOID UsbCloseHostProtoByChild | ( | IN USB_BUS * | Bus, |
IN EFI_HANDLE | Child | ||
) |
Close the USB host controller protocol BY_CHILD.
Bus | The USB bus driver. |
Child | The child handle. |
Close the USB host controller protocol BY_CHILD.
Bus | The USB bus driver. |
Child | The child handle. |
Definition at line 511 of file UsbUtility.c.
EFI_TPL UsbGetCurrentTpl | ( | VOID | ) |
return the current TPL, copied from the EDKII glue lib.
VOID. |
Definition at line 542 of file UsbUtility.c.
EFI_STATUS UsbHcAsyncInterruptTransfer | ( | IN USB_BUS * | UsbBus, |
IN UINT8 | DevAddr, | ||
IN UINT8 | EpAddr, | ||
IN UINT8 | DevSpeed, | ||
IN UINTN | MaxPacket, | ||
IN BOOLEAN | IsNewTransfer, | ||
IN OUT UINT8 * | DataToggle, | ||
IN UINTN | PollingInterval, | ||
IN UINTN | DataLength, | ||
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR * | Translator, | ||
IN EFI_ASYNC_USB_TRANSFER_CALLBACK | Callback, | ||
IN VOID *Context | OPTIONAL | ||
) |
Queue or cancel an asynchronous interrupt transfer.
UsbBus | The USB bus driver. |
DevAddr | The target device address. |
EpAddr | The target endpoint address, with direction encoded in bit 7. |
DevSpeed | The device's speed. |
MaxPacket | The endpoint's max packet size. |
IsNewTransfer | Whether this is a new request. If not, cancel the old request. |
DataToggle | Data toggle to use on input, next toggle on output. |
PollingInterval | The interval to poll the interrupt transfer (in ms). |
DataLength | The length of periodical data receive. |
Translator | The transaction translator for low/full speed device. |
Callback | Function to call when data is received. |
Context | The context to the callback. |
EFI_SUCCESS | The asynchronous transfer is queued. |
Others | Failed to queue the transfer. |
Definition at line 335 of file UsbUtility.c.
EFI_STATUS UsbHcBulkTransfer | ( | IN USB_BUS * | UsbBus, |
IN UINT8 | DevAddr, | ||
IN UINT8 | EpAddr, | ||
IN UINT8 | DevSpeed, | ||
IN UINTN | MaxPacket, | ||
IN UINT8 | BufferNum, | ||
IN OUT VOID * | Data[], | ||
IN OUT UINTN * | DataLength, | ||
IN OUT UINT8 * | DataToggle, | ||
IN UINTN | TimeOut, | ||
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR * | Translator, | ||
OUT UINT32 * | UsbResult | ||
) |
Execute a bulk transfer to the device's endpoint.
UsbBus | The USB bus driver. |
DevAddr | The target device address. |
EpAddr | The target endpoint address, with direction encoded in bit 7. |
DevSpeed | The device's speed. |
MaxPacket | The endpoint's max packet size. |
BufferNum | The number of data buffer. |
Data | Array of pointers to data buffer. |
DataLength | The length of data buffer. |
DataToggle | On input, the initial data toggle to use, also return the next toggle on output. |
TimeOut | The time to wait until timeout. |
Translator | The transaction translator for low/full speed device. |
UsbResult | The result of USB execution. |
EFI_SUCCESS | The bulk transfer is finished without error. |
Others | Failed to execute bulk transfer, result in UsbResult. |
Definition at line 263 of file UsbUtility.c.
EFI_STATUS UsbHcClearRootHubPortFeature | ( | IN USB_BUS * | UsbBus, |
IN UINT8 | PortIndex, | ||
IN EFI_USB_PORT_FEATURE | Feature | ||
) |
Clear the root hub port feature.
UsbBus | The USB bus driver. |
PortIndex | The port index. |
Feature | The port feature to clear. |
EFI_SUCCESS | The port feature is clear. |
Others | Failed to clear port feature. |
Definition at line 153 of file UsbUtility.c.
EFI_STATUS UsbHcControlTransfer | ( | IN USB_BUS * | UsbBus, |
IN UINT8 | DevAddr, | ||
IN UINT8 | DevSpeed, | ||
IN UINTN | MaxPacket, | ||
IN EFI_USB_DEVICE_REQUEST * | Request, | ||
IN EFI_USB_DATA_DIRECTION | Direction, | ||
IN OUT VOID * | Data, | ||
IN OUT UINTN * | DataLength, | ||
IN UINTN | TimeOut, | ||
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR * | Translator, | ||
OUT UINT32 * | UsbResult | ||
) |
Execute a control transfer to the device.
UsbBus | The USB bus driver. |
DevAddr | The device address. |
DevSpeed | The device speed. |
MaxPacket | Maximum packet size of endpoint 0. |
Request | The control transfer request. |
Direction | The direction of data stage. |
Data | The buffer holding data. |
DataLength | The length of the data. |
TimeOut | Timeout (in ms) to wait until timeout. |
Translator | The transaction translator for low/full speed device. |
UsbResult | The result of transfer. |
EFI_SUCCESS | The control transfer finished without error. |
Others | The control transfer failed, reason returned in UsbResult. |
Execute a control transfer to the device.
UsbBus | The USB bus driver. |
DevAddr | The device address. |
DevSpeed | The device speed. |
MaxPacket | Maximum packet size of endpoint 0. |
Request | The control transfer request. |
Direction | The direction of data stage. |
Data | The buffer holding data. |
DataLength | The length of the data. |
TimeOut | Timeout (in ms) to wait until timeout. |
Translator | The transaction translator for low/full speed device. |
UsbResult | The result of transfer. |
EFI_SUCCESS | The control transfer finished without error. |
Others | The control transfer failed, reason returned in UsbReslt. |
Definition at line 190 of file UsbUtility.c.
EFI_STATUS UsbHcGetCapability | ( | IN USB_BUS * | UsbBus, |
OUT UINT8 * | MaxSpeed, | ||
OUT UINT8 * | NumOfPort, | ||
OUT UINT8 * | Is64BitCapable | ||
) |
Get the capability of the host controller.
UsbBus | The usb driver. |
MaxSpeed | The maximum speed this host controller supports. |
NumOfPort | The number of the root hub port. |
Is64BitCapable | Whether this controller support 64 bit addressing. |
EFI_SUCCESS | The host controller capability is returned. |
Others | Failed to retrieve the host controller capability. |
Definition at line 57 of file UsbUtility.c.
EFI_STATUS UsbHcGetRootHubPortStatus | ( | IN USB_BUS * | UsbBus, |
IN UINT8 | PortIndex, | ||
OUT EFI_USB_PORT_STATUS * | PortStatus | ||
) |
Get the root hub port state.
UsbBus | The USB bus driver. |
PortIndex | The index of port. |
PortStatus | The variable to save port state. |
EFI_SUCCESS | The root port state is returned in. |
Others | Failed to get the root hub port state. |
Definition at line 95 of file UsbUtility.c.
EFI_STATUS UsbHcSetRootHubPortFeature | ( | IN USB_BUS * | UsbBus, |
IN UINT8 | PortIndex, | ||
IN EFI_USB_PORT_FEATURE | Feature | ||
) |
Set the root hub port feature.
UsbBus | The USB bus driver. |
PortIndex | The port index. |
Feature | The port feature to set. |
EFI_SUCCESS | The port feature is set. |
Others | Failed to set port feature. |
Definition at line 124 of file UsbUtility.c.
EFI_STATUS UsbHcSyncInterruptTransfer | ( | IN USB_BUS * | UsbBus, |
IN UINT8 | DevAddr, | ||
IN UINT8 | EpAddr, | ||
IN UINT8 | DevSpeed, | ||
IN UINTN | MaxPacket, | ||
IN OUT VOID * | Data, | ||
IN OUT UINTN * | DataLength, | ||
IN OUT UINT8 * | DataToggle, | ||
IN UINTN | TimeOut, | ||
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR * | Translator, | ||
OUT UINT32 * | UsbResult | ||
) |
Execute a synchronous interrupt transfer to the target endpoint.
UsbBus | The USB bus driver. |
DevAddr | The target device address. |
EpAddr | The target endpoint address, with direction encoded in bit 7. |
DevSpeed | The device's speed. |
MaxPacket | The endpoint's max packet size. |
Data | Pointer to data buffer. |
DataLength | The length of data buffer. |
DataToggle | On input, the initial data toggle to use, also return the next toggle on output. |
TimeOut | The time to wait until timeout. |
Translator | The transaction translator for low/full speed device. |
UsbResult | The result of USB execution. |
EFI_SUCCESS | The synchronous interrupt transfer is OK. |
Others | Failed to execute the synchronous interrupt transfer. |
Definition at line 411 of file UsbUtility.c.
EFI_STATUS UsbOpenHostProtoByChild | ( | IN USB_BUS * | Bus, |
IN EFI_HANDLE | Child | ||
) |
Open the USB host controller protocol BY_CHILD.
Bus | The USB bus driver. |
Child | The child handle. |
Definition at line 471 of file UsbUtility.c.