]> git.proxmox.com Git - mirror_edk2.git/blob - EdkModulePkg/Bus/Usb/UsbCbi/Dxe/cbi.h
e2a7c9d5af13e902172ecd0021d8c5f96e1fd5aa
[mirror_edk2.git] / EdkModulePkg / Bus / Usb / UsbCbi / Dxe / 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 #endif