]> git.proxmox.com Git - mirror_edk2.git/blob - 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
1 /*++
2
3 Copyright (c) 2006, 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 cbi.h
15
16 Abstract:
17
18 USB CBI transportation protocol definitions.
19 --*/
20
21 #ifndef _CBI_H
22 #define _CBI_H
23
24
25 #include <IndustryStandard/Usb.h>
26
27 #define bit(a) (1 << (a))
28
29 #define MASS_STORAGE_CLASS 0x08
30 #define CBI0_INTERFACE_PROTOCOL 0x00
31 #define CBI1_INTERFACE_PROTOCOL 0x01
32
33 //
34 // in millisecond unit
35 //
36 #define STALL_1_SECOND 1000
37
38 #pragma pack(1)
39 //
40 // Data block definition for transportation through interrupt endpoint
41 //
42 typedef struct {
43 UINT8 bType;
44 UINT8 bValue;
45 } INTERRUPT_DATA_BLOCK;
46
47 #pragma pack()
48
49 #define USB_CBI_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('u', 'c', 'b', 'i')
50
51 //
52 // Device structure for CBI, interrupt endpoint may be not used in
53 // CBI1 Protocol
54 //
55 typedef struct {
56 UINT32 Signature;
57 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
58 EFI_USB_ATAPI_PROTOCOL UsbAtapiProtocol;
59 EFI_USB_IO_PROTOCOL *UsbIo;
60 EFI_USB_INTERFACE_DESCRIPTOR InterfaceDescriptor;
61 EFI_USB_ENDPOINT_DESCRIPTOR BulkInEndpointDescriptor;
62 EFI_USB_ENDPOINT_DESCRIPTOR BulkOutEndpointDescriptor;
63 EFI_USB_ENDPOINT_DESCRIPTOR InterruptEndpointDescriptor;
64 EFI_UNICODE_STRING_TABLE *ControllerNameTable;
65 } USB_CBI_DEVICE;
66
67 #define USB_CBI_DEVICE_FROM_THIS(a) \
68 CR(a, USB_CBI_DEVICE, UsbAtapiProtocol, USB_CBI_DEVICE_SIGNATURE)
69
70 extern EFI_COMPONENT_NAME_PROTOCOL gUsbCbi0ComponentName;
71 extern EFI_DRIVER_BINDING_PROTOCOL gUsbCbi0DriverBinding;
72
73 //
74 // EFI Component Name Functions
75 //
76 EFI_STATUS
77 EFIAPI
78 UsbCbi0ComponentNameGetDriverName (
79 IN EFI_COMPONENT_NAME_PROTOCOL *This,
80 IN CHAR8 *Language,
81 OUT CHAR16 **DriverName
82 );
83
84 EFI_STATUS
85 EFIAPI
86 UsbCbi0ComponentNameGetControllerName (
87 IN EFI_COMPONENT_NAME_PROTOCOL *This,
88 IN EFI_HANDLE ControllerHandle,
89 IN EFI_HANDLE ChildHandle OPTIONAL,
90 IN CHAR8 *Language,
91 OUT CHAR16 **ControllerName
92 );
93
94 #endif