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
13
extern
USB_MASS_TRANSPORT
mUsbCbi0Transport;
14
extern
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
31
typedef
struct
{
32
//
33
// Put Interface at the first field to make it easy to distinguish BOT/CBI Protocol instance
34
//
35
EFI_USB_INTERFACE_DESCRIPTOR
Interface;
36
EFI_USB_ENDPOINT_DESCRIPTOR
*BulkInEndpoint;
37
EFI_USB_ENDPOINT_DESCRIPTOR
*BulkOutEndpoint;
38
EFI_USB_ENDPOINT_DESCRIPTOR
*InterruptEndpoint;
39
EFI_USB_IO_PROTOCOL
*UsbIo;
40
}
USB_CBI_PROTOCOL
;
41
42
#pragma pack(1)
43
typedef
struct
{
44
UINT8 Type;
45
UINT8 Value;
46
}
USB_CBI_STATUS
;
47
#pragma pack()
48
64
EFI_STATUS
65
UsbCbiInit
(
66
IN
EFI_USB_IO_PROTOCOL
*UsbIo,
67
OUT
VOID **Context OPTIONAL
68
);
69
87
EFI_STATUS
88
UsbCbiExecCommand
(
89
IN
VOID *Context,
90
IN
VOID *Cmd,
91
IN
UINT8 CmdLen,
92
IN
EFI_USB_DATA_DIRECTION
DataDir,
93
IN
VOID *Data,
94
IN
UINT32 DataLen,
95
IN
UINT8 Lun,
96
IN
UINT32 Timeout,
97
OUT
UINT32 *CmdStatus
98
);
99
115
EFI_STATUS
116
UsbCbiResetDevice
(
117
IN
VOID *Context,
118
IN
BOOLEAN ExtendedVerification
119
);
120
129
EFI_STATUS
130
UsbCbiCleanUp
(
131
IN
VOID *Context
132
);
133
134
#endif
IN
#define IN
Definition:
Base.h:279
OUT
#define OUT
Definition:
Base.h:284
EFI_USB_DATA_DIRECTION
EFI_USB_DATA_DIRECTION
Definition:
UsbIo.h:44
EFI_STATUS
RETURN_STATUS EFI_STATUS
Definition:
UefiBaseType.h:29
UsbCbiCleanUp
EFI_STATUS UsbCbiCleanUp(IN VOID *Context)
Definition:
UsbMassCbi.c:597
UsbCbiResetDevice
EFI_STATUS UsbCbiResetDevice(IN VOID *Context, IN BOOLEAN ExtendedVerification)
Definition:
UsbMassCbi.c:542
UsbCbiExecCommand
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
UsbCbiInit
EFI_STATUS UsbCbiInit(IN EFI_USB_IO_PROTOCOL *UsbIo, OUT VOID **Context OPTIONAL)
Definition:
UsbMassCbi.c:54
_EFI_USB_IO_PROTOCOL
Definition:
UsbIo.h:476
_USB_MASS_TRANSPORT
Definition:
UsbMass.h:160
USB_CBI_PROTOCOL
Definition:
UsbMassCbi.h:31
USB_CBI_STATUS
Definition:
UsbMassCbi.h:43
USB_ENDPOINT_DESCRIPTOR
Definition:
Usb.h:171
USB_INTERFACE_DESCRIPTOR
Definition:
Usb.h:155
MdeModulePkg
Bus
Usb
UsbMassStorageDxe
UsbMassCbi.h
Generated on Fri Nov 15 2024 18:01:10 for TianoCore EDK2 by
1.9.6