]> git.proxmox.com Git - mirror_edk2.git/blob - EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.h
Clean up MSA file of the checked in modules which include:
[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 extern UINT32 gBOTDebugLevel;
26 extern UINT32 gBOTErrorLevel;
27 #define MASS_STORAGE_CLASS 0x08
28
29 #pragma pack(1)
30 //
31 // Bulk Only device protocol
32 //
33 typedef struct {
34 UINT32 dCBWSignature;
35 UINT32 dCBWTag;
36 UINT32 dCBWDataTransferLength;
37 UINT8 bmCBWFlags;
38 UINT8 bCBWLUN;
39 UINT8 bCBWCBLength;
40 UINT8 CBWCB[16];
41 } CBW;
42
43 typedef struct {
44 UINT32 dCSWSignature;
45 UINT32 dCSWTag;
46 UINT32 dCSWDataResidue;
47 UINT8 bCSWStatus;
48 } CSW;
49
50 #pragma pack()
51
52 #define USB_BOT_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('u', 'b', 'o', 't')
53
54 typedef struct {
55 UINTN Signature;
56 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
57 EFI_USB_ATAPI_PROTOCOL UsbAtapiProtocol;
58 EFI_USB_IO_PROTOCOL *UsbIo;
59 EFI_USB_INTERFACE_DESCRIPTOR *InterfaceDescriptor;
60 EFI_USB_ENDPOINT_DESCRIPTOR *BulkInEndpointDescriptor;
61 EFI_USB_ENDPOINT_DESCRIPTOR *BulkOutEndpointDescriptor;
62 EFI_UNICODE_STRING_TABLE *ControllerNameTable;
63 } USB_BOT_DEVICE;
64
65 #define USB_BOT_DEVICE_FROM_THIS(a) \
66 CR(a, USB_BOT_DEVICE, UsbAtapiProtocol, USB_BOT_DEVICE_SIGNATURE)
67
68 //
69 // Status code, see Usb Bot device spec
70 //
71 #define CSWSIG 0x53425355
72 #define CBWSIG 0x43425355
73
74 //
75 // Global Variables
76 //
77 extern EFI_DRIVER_BINDING_PROTOCOL gUsbBotDriverBinding;
78 extern EFI_COMPONENT_NAME_PROTOCOL gUsbBotComponentName;
79
80 //
81 // Bot Driver Binding Protocol
82 //
83 EFI_STATUS
84 EFIAPI
85 BotDriverBindingSupported (
86 IN EFI_DRIVER_BINDING_PROTOCOL *This,
87 IN EFI_HANDLE ControllerHandle,
88 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
89 );
90
91 EFI_STATUS
92 EFIAPI
93 BotDriverBindingStart (
94 IN EFI_DRIVER_BINDING_PROTOCOL *This,
95 IN EFI_HANDLE ControllerHandle,
96 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
97 );
98
99 EFI_STATUS
100 EFIAPI
101 BotDriverBindingStop (
102 IN EFI_DRIVER_BINDING_PROTOCOL *This,
103 IN EFI_HANDLE ControllerHandle,
104 IN UINTN NumberOfChildren,
105 IN EFI_HANDLE *ChildHandleBuffer
106 );
107
108 //
109 // EFI Component Name Functions
110 //
111 EFI_STATUS
112 EFIAPI
113 UsbBotComponentNameGetDriverName (
114 IN EFI_COMPONENT_NAME_PROTOCOL *This,
115 IN CHAR8 *Language,
116 OUT CHAR16 **DriverName
117 );
118
119 EFI_STATUS
120 EFIAPI
121 UsbBotComponentNameGetControllerName (
122 IN EFI_COMPONENT_NAME_PROTOCOL *This,
123 IN EFI_HANDLE ControllerHandle,
124 IN EFI_HANDLE ChildHandle OPTIONAL,
125 IN CHAR8 *Language,
126 OUT CHAR16 **ControllerName
127 );
128
129 #endif