11#ifndef _EFI_USBMASS_BOT_H_
12#define _EFI_USBMASS_BOT_H_
19#define USB_BOT_RESET_REQUEST 0xFF
20#define USB_BOT_GETLUN_REQUEST 0xFE
21#define USB_BOT_CBW_SIGNATURE 0x43425355
22#define USB_BOT_CSW_SIGNATURE 0x53425355
23#define USB_BOT_MAX_LUN 0x0F
24#define USB_BOT_MAX_CMDLEN 16
29#define USB_BOT_COMMAND_OK 0x00
30#define USB_BOT_COMMAND_FAILED 0x01
31#define USB_BOT_COMMAND_ERROR 0x02
36#define USB_BOT_RECV_CSW_RETRY 3
41#define USB_BOT_RESET_DEVICE_STALL (100 * USB_MASS_1_MILLISECOND)
46#define USB_BOT_SEND_CBW_TIMEOUT (3 * USB_MASS_1_SECOND)
47#define USB_BOT_RECV_CSW_TIMEOUT (3 * USB_MASS_1_SECOND)
48#define USB_BOT_RESET_DEVICE_TIMEOUT (3 * USB_MASS_1_SECOND)
104 OUT VOID **Context OPTIONAL
136 OUT UINT32 *CmdStatus
154 IN BOOLEAN ExtendedVerification
EFI_STATUS UsbBotExecCommand(IN VOID *Context, IN VOID *Cmd, IN UINT8 CmdLen, IN EFI_USB_DATA_DIRECTION DataDir, IN VOID *Data, IN UINT32 DataLen, IN UINT8 Lun, IN UINT32 Timeout, OUT UINT32 *CmdStatus)
#define USB_BOT_MAX_CMDLEN
Maximum number of command from command set.
EFI_STATUS UsbBotInit(IN EFI_USB_IO_PROTOCOL *UsbIo, OUT VOID **Context OPTIONAL)
EFI_STATUS UsbBotCleanUp(IN VOID *Context)
EFI_STATUS UsbBotResetDevice(IN VOID *Context, IN BOOLEAN ExtendedVerification)
EFI_STATUS UsbBotGetMaxLun(IN VOID *Context, OUT UINT8 *MaxLun)
UINT8 CmdLen
Length of the command. Bits 0~4 are used.
UINT8 Flag
Bit 7, 0 ~ Data-Out, 1 ~ Data-In.
UINT32 DataLen
Length of data between CBW and CSW.
UINT8 Lun
Lun number. Bits 0~3 are used.