TianoCore EDK2 master
Loading...
Searching...
No Matches
UsbMassCbi.h
Go to the documentation of this file.
1
10#ifndef _EFI_USBMASS_CBI_H_
11#define _EFI_USBMASS_CBI_H_
12
13extern USB_MASS_TRANSPORT mUsbCbi0Transport;
14extern USB_MASS_TRANSPORT mUsbCbi1Transport;
15
16#define USB_CBI_MAX_PACKET_NUM 16
17#define USB_CBI_RESET_CMD_LEN 12
18//
19// USB CBI retry C/B/I transport times, set by experience
20//
21#define USB_CBI_MAX_RETRY 3
22//
23// Time to wait for USB CBI reset to complete, set by experience
24//
25#define USB_CBI_RESET_DEVICE_STALL (50 * USB_MASS_1_MILLISECOND)
26//
27// USB CBI transport timeout, set by experience
28//
29#define USB_CBI_RESET_DEVICE_TIMEOUT (1 * USB_MASS_1_SECOND)
30
31typedef struct {
32 //
33 // Put Interface at the first field to make it easy to distinguish BOT/CBI Protocol instance
34 //
36 EFI_USB_ENDPOINT_DESCRIPTOR *BulkInEndpoint;
37 EFI_USB_ENDPOINT_DESCRIPTOR *BulkOutEndpoint;
38 EFI_USB_ENDPOINT_DESCRIPTOR *InterruptEndpoint;
41
42#pragma pack(1)
43typedef struct {
44 UINT8 Type;
45 UINT8 Value;
47#pragma pack()
48
67 OUT VOID **Context OPTIONAL
68 );
69
89 IN VOID *Context,
90 IN VOID *Cmd,
91 IN UINT8 CmdLen,
93 IN VOID *Data,
94 IN UINT32 DataLen,
95 IN UINT8 Lun,
96 IN UINT32 Timeout,
97 OUT UINT32 *CmdStatus
98 );
99
117 IN VOID *Context,
118 IN BOOLEAN ExtendedVerification
119 );
120
131 IN VOID *Context
132 );
133
134#endif
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_USB_DATA_DIRECTION
Definition: UsbIo.h:44
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
EFI_STATUS UsbCbiCleanUp(IN VOID *Context)
Definition: UsbMassCbi.c:597
EFI_STATUS UsbCbiResetDevice(IN VOID *Context, IN BOOLEAN ExtendedVerification)
Definition: UsbMassCbi.c:542
EFI_STATUS UsbCbiExecCommand(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)
Definition: UsbMassCbi.c:426
EFI_STATUS UsbCbiInit(IN EFI_USB_IO_PROTOCOL *UsbIo, OUT VOID **Context OPTIONAL)
Definition: UsbMassCbi.c:54