]>
Commit | Line | Data |
---|---|---|
878ddf1f | 1 | /*++\r |
2 | \r | |
3 | Copyright (c) 2006, Intel Corporation \r | |
4 | All rights reserved. This program and the accompanying materials \r | |
5 | are licensed and made available under the terms and conditions of the BSD License \r | |
6 | which accompanies this distribution. The full text of the license may be found at \r | |
7 | http://opensource.org/licenses/bsd-license.php \r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | \r | |
12 | Module Name:\r | |
13 | \r | |
14 | cbi.h\r | |
15 | \r | |
16 | Abstract:\r | |
17 | \r | |
18 | USB CBI transportation protocol definitions.\r | |
19 | --*/\r | |
20 | \r | |
21 | #ifndef _CBI_H\r | |
22 | #define _CBI_H\r | |
23 | \r | |
24 | \r | |
f0ec738d | 25 | #include <IndustryStandard/Usb.h>\r |
878ddf1f | 26 | \r |
27 | #define bit(a) (1 << (a))\r | |
28 | \r | |
29 | #define MASS_STORAGE_CLASS 0x08\r | |
30 | #define CBI0_INTERFACE_PROTOCOL 0x00\r | |
31 | #define CBI1_INTERFACE_PROTOCOL 0x01\r | |
32 | \r | |
33 | //\r | |
34 | // in millisecond unit\r | |
35 | //\r | |
36 | #define STALL_1_SECOND 1000 \r | |
37 | \r | |
38 | #pragma pack(1)\r | |
39 | //\r | |
40 | // Data block definition for transportation through interrupt endpoint\r | |
41 | //\r | |
42 | typedef struct {\r | |
43 | UINT8 bType;\r | |
44 | UINT8 bValue;\r | |
45 | } INTERRUPT_DATA_BLOCK;\r | |
46 | \r | |
47 | #pragma pack()\r | |
48 | \r | |
49 | #define USB_CBI_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('u', 'c', 'b', 'i')\r | |
50 | \r | |
51 | //\r | |
52 | // Device structure for CBI, interrupt endpoint may be not used in\r | |
53 | // CBI1 Protocol\r | |
54 | //\r | |
55 | typedef struct {\r | |
56 | UINT32 Signature;\r | |
57 | EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r | |
58 | EFI_USB_ATAPI_PROTOCOL UsbAtapiProtocol;\r | |
59 | EFI_USB_IO_PROTOCOL *UsbIo;\r | |
60 | EFI_USB_INTERFACE_DESCRIPTOR InterfaceDescriptor;\r | |
61 | EFI_USB_ENDPOINT_DESCRIPTOR BulkInEndpointDescriptor;\r | |
62 | EFI_USB_ENDPOINT_DESCRIPTOR BulkOutEndpointDescriptor;\r | |
63 | EFI_USB_ENDPOINT_DESCRIPTOR InterruptEndpointDescriptor;\r | |
64 | EFI_UNICODE_STRING_TABLE *ControllerNameTable;\r | |
65 | } USB_CBI_DEVICE;\r | |
66 | \r | |
67 | #define USB_CBI_DEVICE_FROM_THIS(a) \\r | |
68 | CR(a, USB_CBI_DEVICE, UsbAtapiProtocol, USB_CBI_DEVICE_SIGNATURE)\r | |
69 | \r | |
70 | #endif\r |