]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi0/cbi.h
Make EdkModulePkg pass Intel IPF compiler with /W4 /WX switches, solving warning...
[mirror_edk2.git] / EdkModulePkg / Bus / Usb / UsbCbi / Dxe / Cbi0 / cbi.h
CommitLineData
878ddf1f 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 cbi.h\r
15\r
16Abstract:\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
42typedef 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
55typedef 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
92dda53e 70extern EFI_COMPONENT_NAME_PROTOCOL gUsbCbi0ComponentName;\r
71extern EFI_DRIVER_BINDING_PROTOCOL gUsbCbi0DriverBinding;\r
72\r
73//\r
74// EFI Component Name Functions\r
75//\r
76EFI_STATUS\r
77EFIAPI\r
78UsbCbi0ComponentNameGetDriverName (\r
79 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
80 IN CHAR8 *Language,\r
81 OUT CHAR16 **DriverName\r
82 );\r
83\r
84EFI_STATUS\r
85EFIAPI\r
86UsbCbi0ComponentNameGetControllerName (\r
87 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
88 IN EFI_HANDLE ControllerHandle,\r
89 IN EFI_HANDLE ChildHandle OPTIONAL,\r
90 IN CHAR8 *Language,\r
91 OUT CHAR16 **ControllerName\r
92 );\r
93\r
878ddf1f 94#endif\r