]> git.proxmox.com Git - mirror_edk2.git/blob - EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.h
5f9006b5bd3ca67471ed79fef6292d8faa3d7b05
[mirror_edk2.git] / EdkModulePkg / Bus / Usb / UsbBot / Dxe / bot.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 BOT.h
15
16 Abstract:
17
18 --*/
19
20 #ifndef _BOT_H
21 #define _BOT_H
22
23
24 #include <IndustryStandard/Usb.h>
25
26 #pragma pack(1)
27 //
28 // Bulk Only device protocol
29 //
30 typedef struct {
31 UINT32 dCBWSignature;
32 UINT32 dCBWTag;
33 UINT32 dCBWDataTransferLength;
34 UINT8 bmCBWFlags;
35 UINT8 bCBWLUN;
36 UINT8 bCBWCBLength;
37 UINT8 CBWCB[16];
38 } CBW;
39
40 typedef struct {
41 UINT32 dCSWSignature;
42 UINT32 dCSWTag;
43 UINT32 dCSWDataResidue;
44 UINT8 bCSWStatus;
45 } CSW;
46
47 #pragma pack()
48
49 #define USB_BOT_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('u', 'b', 'o', 't')
50
51 typedef struct {
52 UINTN Signature;
53 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
54 EFI_USB_ATAPI_PROTOCOL UsbAtapiProtocol;
55 EFI_USB_IO_PROTOCOL *UsbIo;
56 EFI_USB_INTERFACE_DESCRIPTOR *InterfaceDescriptor;
57 EFI_USB_ENDPOINT_DESCRIPTOR *BulkInEndpointDescriptor;
58 EFI_USB_ENDPOINT_DESCRIPTOR *BulkOutEndpointDescriptor;
59 EFI_UNICODE_STRING_TABLE *ControllerNameTable;
60 } USB_BOT_DEVICE;
61
62 #define USB_BOT_DEVICE_FROM_THIS(a) \
63 CR(a, USB_BOT_DEVICE, UsbAtapiProtocol, USB_BOT_DEVICE_SIGNATURE)
64
65 //
66 // Status code, see Usb Bot device spec
67 //
68 #define CSWSIG 0x53425355
69 #define CBWSIG 0x43425355
70
71 //
72 // Global Variables
73 //
74 extern EFI_DRIVER_BINDING_PROTOCOL gUsbBotDriverBinding;
75 extern EFI_COMPONENT_NAME_PROTOCOL gUsbBotComponentName;
76 extern EFI_GUID gUsbBotDriverGuid;
77
78 #endif