TianoCore EDK2 master
|
#include "Ehci.h"
Go to the source code of this file.
Functions | |
EHC_QTD * | EhcCreateQtd (IN USB2_HC_DEV *Ehc, IN UINT8 *Data, IN UINT8 *DataPhy, IN UINTN DataLen, IN UINT8 PktId, IN UINT8 Toggle, IN UINTN MaxPacket) |
VOID | EhcInitIntQh (IN USB_ENDPOINT *Ep, IN QH_HW *QhHw) |
EHC_QH * | EhcCreateQh (IN USB2_HC_DEV *Ehci, IN USB_ENDPOINT *Ep) |
UINTN | EhcConvertPollRate (IN UINTN Interval) |
VOID | EhcFreeQtds (IN USB2_HC_DEV *Ehc, IN LIST_ENTRY *Qtds) |
VOID | EhcFreeUrb (IN USB2_HC_DEV *Ehc, IN URB *Urb) |
EFI_STATUS | EhcCreateQtds (IN USB2_HC_DEV *Ehc, IN URB *Urb) |
URB * | EhcCreateUrb (IN USB2_HC_DEV *Ehc, IN UINT8 DevAddr, IN UINT8 EpAddr, IN UINT8 DevSpeed, IN UINT8 Toggle, IN UINTN MaxPacket, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Hub, IN UINTN Type, IN EFI_USB_DEVICE_REQUEST *Request, IN VOID *Data, IN UINTN DataLen, IN EFI_ASYNC_USB_TRANSFER_CALLBACK Callback, IN VOID *Context, IN UINTN Interval) |
This file contains URB request, each request is warpped in a URB (Usb Request Block).
Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.
Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file EhciUrb.c.
Convert the poll interval from application to that be used by EHCI interface data structure. Only need to get the max 2^n that is less than interval. UEFI can't support high speed endpoint with a interval less than 8 microframe because interval is specified in the unit of ms (millisecond).
Interval | The interval to convert. |
EHC_QH * EhcCreateQh | ( | IN USB2_HC_DEV * | Ehci, |
IN USB_ENDPOINT * | Ep | ||
) |
EHC_QTD * EhcCreateQtd | ( | IN USB2_HC_DEV * | Ehc, |
IN UINT8 * | Data, | ||
IN UINT8 * | DataPhy, | ||
IN UINTN | DataLen, | ||
IN UINT8 | PktId, | ||
IN UINT8 | Toggle, | ||
IN UINTN | MaxPacket | ||
) |
Create a single QTD to hold the data.
Ehc | The EHCI device. |
Data | The cpu memory address of current data not associated with a QTD. |
DataPhy | The pci bus address of current data not associated with a QTD. |
DataLen | The length of the data. |
PktId | Packet ID to use in the QTD. |
Toggle | Data toggle to use in the QTD. |
MaxPacket | Maximu packet length of the endpoint. |
EFI_STATUS EhcCreateQtds | ( | IN USB2_HC_DEV * | Ehc, |
IN URB * | Urb | ||
) |
URB * EhcCreateUrb | ( | IN USB2_HC_DEV * | Ehc, |
IN UINT8 | DevAddr, | ||
IN UINT8 | EpAddr, | ||
IN UINT8 | DevSpeed, | ||
IN UINT8 | Toggle, | ||
IN UINTN | MaxPacket, | ||
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR * | Hub, | ||
IN UINTN | Type, | ||
IN EFI_USB_DEVICE_REQUEST * | Request, | ||
IN VOID * | Data, | ||
IN UINTN | DataLen, | ||
IN EFI_ASYNC_USB_TRANSFER_CALLBACK | Callback, | ||
IN VOID * | Context, | ||
IN UINTN | Interval | ||
) |
Create a new URB and its associated QTD.
Ehc | The EHCI device. |
DevAddr | The device address. |
EpAddr | Endpoint addrress & its direction. |
DevSpeed | The device speed. |
Toggle | Initial data toggle to use. |
MaxPacket | The max packet length of the endpoint. |
Hub | The transaction translator to use. |
Type | The transaction type. |
Request | The standard USB request for control transfer. |
Data | The user data to transfer. |
DataLen | The length of data buffer. |
Callback | The function to call when data is transferred. |
Context | The context to the callback. |
Interval | The interval for interrupt transfer. |
VOID EhcFreeQtds | ( | IN USB2_HC_DEV * | Ehc, |
IN LIST_ENTRY * | Qtds | ||
) |
VOID EhcFreeUrb | ( | IN USB2_HC_DEV * | Ehc, |
IN URB * | Urb | ||
) |
VOID EhcInitIntQh | ( | IN USB_ENDPOINT * | Ep, |
IN QH_HW * | QhHw | ||
) |