beautypg.com

Intel Extensible Firmware Interface User Manual

Page 581

background image

Protocols

— USB Support

Version 1.10

12/01/02

14-41

Related Definitions

typedef enum {
EfiUsbDataIn,
EfiUsbDataOut,
EfiUsbNoData
} EFI_USB_DATA_DIRECTION;

//
// Error code for USB Transfer Results
//
#define

EFI_USB_NOERROR

0x0000

#define EFI_USB_ERR_NOTEXECUTE

0x0001

#define

EFI_USB_ERR_STALL

0x0002

#define

EFI_USB_ERR_BUFFER

0x0004

#define

EFI_USB_ERR_BABBLE

0x0008

#define

EFI_USB_ERR_NAK

0x0010

#define

EFI_USB_ERR_CRC

0x0020

#define EFI_USB_ERR_TIMEOUT

0x0040

#define EFI_USB_ERR_BITSTUFF

0x0080

#define

EFI_USB_ERR_SYSTEM

0x0100


typedef struct {
UINT8

RequestType;

UINT8

Request;

UINT16

Value;

UINT16

Index;

UINT16

Length;

} EFI_USB_DEVICE_REQUEST;

RequestType

The field identifies the characteristics of the specific request.

Request

This field specifies the particular request.

Value

This field is used to pass a parameter to USB device that is specific
to the request.

Index

This field is also used to pass a parameter to USB device that is
specific to the request.

Length

This field specifies the length of the data transferred during the
second phase of the control transfer. If it is 0, then there is no data
phase in this transfer.