]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.h
61954e6be950333b50cc7397178847f6d7eeef91
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbMassStorageDxe / UsbMassCbi.h
1 /** @file
2
3 Copyright (c) 2007, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 UsbMassCbi.h
15
16 Abstract:
17
18 Defination for the USB mass storage Control/Bulk/Interrupt transpor.
19
20 Revision History
21
22
23 **/
24
25 #ifndef _EFI_USBMASS_CBI_H_
26 #define _EFI_USBMASS_CBI_H_
27
28 enum {
29 USB_CBI_MAX_PACKET_NUM = 16,
30 USB_CBI_RESET_CMD_LEN = 12,
31
32 //
33 // Usb CBI retry times
34 //
35 USB_CBI_MAX_RETRY = 3,
36
37 //
38 // Usb Cbi transfer timeout
39 //
40 USB_CBI_RESET_TIMEOUT = 1 * USB_MASS_STALL_1_S
41 };
42
43 //
44 // Put Interface at the first field is to make it easy to get by Context, which
45 // could be BOT/CBI Protocol instance
46 //
47 typedef struct {
48 EFI_USB_INTERFACE_DESCRIPTOR Interface;
49 EFI_USB_ENDPOINT_DESCRIPTOR *BulkInEndpoint;
50 EFI_USB_ENDPOINT_DESCRIPTOR *BulkOutEndpoint;
51 EFI_USB_ENDPOINT_DESCRIPTOR *InterruptEndpoint;
52 EFI_USB_IO_PROTOCOL *UsbIo;
53 } USB_CBI_PROTOCOL;
54
55 #pragma pack(1)
56 typedef struct {
57 UINT8 Type;
58 UINT8 Value;
59 } USB_CBI_STATUS;
60 #pragma pack()
61
62 extern USB_MASS_TRANSPORT mUsbCbi0Transport;
63 extern USB_MASS_TRANSPORT mUsbCbi1Transport;
64 #endif