TianoCore EDK2 master
|
Go to the source code of this file.
Data Structures | |
struct | QTD_HW |
struct | QH_HW |
struct | _USB_ENDPOINT |
struct | _EHC_QTD |
struct | _EHC_QH |
struct | _URB |
Macros | |
#define | EHC_CTRL_TRANSFER 0x01 |
#define | EHC_BULK_TRANSFER 0x02 |
#define | EHC_INT_TRANSFER_SYNC 0x04 |
#define | EHC_INT_TRANSFER_ASYNC 0x08 |
#define | EHC_QTD_SIG SIGNATURE_32 ('U', 'S', 'B', 'T') |
#define | EHC_QH_SIG SIGNATURE_32 ('U', 'S', 'B', 'H') |
#define | EHC_URB_SIG SIGNATURE_32 ('U', 'S', 'B', 'R') |
#define | EHC_TYPE_ITD 0x00 |
#define | EHC_TYPE_QH 0x02 |
#define | EHC_TYPE_SITD 0x04 |
#define | EHC_TYPE_FSTN 0x06 |
#define | QH_NAK_RELOAD 3 |
#define | QH_HSHBW_MULTI 1 |
#define | QTD_MAX_ERR 3 |
#define | QTD_PID_OUTPUT 0x00 |
#define | QTD_PID_INPUT 0x01 |
#define | QTD_PID_SETUP 0x02 |
#define | QTD_STAT_DO_OUT 0 |
#define | QTD_STAT_DO_SS 0 |
#define | QTD_STAT_DO_PING 0x01 |
#define | QTD_STAT_DO_CS 0x02 |
#define | QTD_STAT_TRANS_ERR 0x08 |
#define | QTD_STAT_BABBLE_ERR 0x10 |
#define | QTD_STAT_BUFF_ERR 0x20 |
#define | QTD_STAT_HALTED 0x40 |
#define | QTD_STAT_ACTIVE 0x80 |
#define | QTD_STAT_ERR_MASK (QTD_STAT_TRANS_ERR | QTD_STAT_BABBLE_ERR | QTD_STAT_BUFF_ERR) |
#define | QTD_MAX_BUFFER 4 |
#define | QTD_BUF_LEN 4096 |
#define | QTD_BUF_MASK 0x0FFF |
#define | QH_MICROFRAME_0 0x01 |
#define | QH_MICROFRAME_1 0x02 |
#define | QH_MICROFRAME_2 0x04 |
#define | QH_MICROFRAME_3 0x08 |
#define | QH_MICROFRAME_4 0x10 |
#define | QH_MICROFRAME_5 0x20 |
#define | QH_MICROFRAME_6 0x40 |
#define | QH_MICROFRAME_7 0x80 |
#define | USB_ERR_SHORT_PACKET 0x200 |
#define | QH_LINK(Addr, Type, Term) ((UINT32) ((EHC_LOW_32BIT (Addr) & 0xFFFFFFE0) | (Type) | ((Term) ? 1 : 0))) |
#define | QTD_LINK(Addr, Term) QH_LINK((Addr), 0, (Term)) |
Typedefs | |
typedef struct _EHC_QTD | EHC_QTD |
typedef struct _EHC_QH | EHC_QH |
typedef struct _URB | URB |
typedef struct _USB_ENDPOINT | USB_ENDPOINT |
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) |
EHC_QH * | EhcCreateQh (IN USB2_HC_DEV *Ehci, IN USB_ENDPOINT *Ep) |
VOID | EhcFreeUrb (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.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file EhciUrb.h.
#define EHC_QH_SIG SIGNATURE_32 ('U', 'S', 'B', 'H') |
#define EHC_QTD_SIG SIGNATURE_32 ('U', 'S', 'B', 'T') |
#define EHC_URB_SIG SIGNATURE_32 ('U', 'S', 'B', 'R') |
#define QH_LINK | ( | Addr, | |
Type, | |||
Term | |||
) | ((UINT32) ((EHC_LOW_32BIT (Addr) & 0xFFFFFFE0) | (Type) | ((Term) ? 1 : 0))) |
#define QTD_STAT_ERR_MASK (QTD_STAT_TRANS_ERR | QTD_STAT_BABBLE_ERR | QTD_STAT_BUFF_ERR) |
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. |
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. |