Commit | Line | Data |
---|---|---|
d1f95000 | 1 | /** @file\r |
2 | EFI_USB_HC_PROTOCOL as defined in EFI 1.10.\r | |
3 | \r | |
9095d37b LG |
4 | The USB Host Controller Protocol is used by code, typically USB bus drivers,\r |
5 | running in the EFI boot services environment, to perform data transactions\r | |
4ca9b6c4 LG |
6 | over a USB bus. In addition, it provides an abstraction for the root hub of the USB bus.\r |
7 | \r | |
9095d37b | 8 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r |
9344f092 | 9 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
d1f95000 | 10 | \r |
d1f95000 | 11 | **/\r |
12 | \r | |
13 | #ifndef _USB_HOSTCONTROLLER_H_\r | |
14 | #define _USB_HOSTCONTROLLER_H_\r | |
15 | \r | |
16 | #include <Protocol/Usb2HostController.h>\r | |
17 | \r | |
18 | #define EFI_USB_HC_PROTOCOL_GUID \\r | |
19 | { \\r | |
20 | 0xf5089266, 0x1aa0, 0x4953, {0x97, 0xd8, 0x56, 0x2f, 0x8a, 0x73, 0xb5, 0x19 } \\r | |
21 | }\r | |
22 | \r | |
99e8ed21 | 23 | ///\r |
24 | /// Forward reference for pure ANSI compatability\r | |
25 | ///\r | |
d1f95000 | 26 | typedef struct _EFI_USB_HC_PROTOCOL EFI_USB_HC_PROTOCOL;\r |
27 | \r | |
28 | //\r | |
29 | // Protocol definitions\r | |
30 | //\r | |
31 | \r | |
9095d37b | 32 | /**\r |
d1f95000 | 33 | Provides software reset for the USB host controller.\r |
9095d37b | 34 | \r |
d1f95000 | 35 | @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r |
36 | @param Attributes A bit mask of the reset operation to perform.\r | |
9095d37b | 37 | \r |
d1f95000 | 38 | @retval EFI_SUCCESS The reset operation succeeded.\r |
39 | @retval EFI_UNSUPPORTED The type of reset specified by Attributes is not currently supported\r | |
9095d37b | 40 | by the host controller hardware.\r |
d1f95000 | 41 | @retval EFI_INVALID_PARAMETER Attributes is not valid.\r |
42 | @retval EFI_DEVICE_ERROR An error was encountered while attempting to perform the reset operation.\r | |
9095d37b | 43 | \r |
d1f95000 | 44 | **/\r |
45 | typedef\r | |
46 | EFI_STATUS\r | |
8b13229b | 47 | (EFIAPI *EFI_USB_HC_PROTOCOL_RESET)(\r |
d1f95000 | 48 | IN EFI_USB_HC_PROTOCOL *This,\r |
49 | IN UINT16 Attributes\r | |
50 | );\r | |
51 | \r | |
9095d37b | 52 | /**\r |
d1f95000 | 53 | Retrieves current state of the USB host controller.\r |
9095d37b | 54 | \r |
d1f95000 | 55 | @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r |
56 | @param State A pointer to the EFI_USB_HC_STATE data structure that\r | |
9095d37b LG |
57 | indicates current state of the USB host controller.\r |
58 | \r | |
d1f95000 | 59 | @retval EFI_SUCCESS The state information of the host controller was returned in State.\r |
60 | @retval EFI_INVALID_PARAMETER State is NULL.\r | |
61 | @retval EFI_DEVICE_ERROR An error was encountered while attempting to retrieve the host controller's\r | |
9095d37b LG |
62 | current state.\r |
63 | \r | |
d1f95000 | 64 | **/\r |
65 | typedef\r | |
66 | EFI_STATUS\r | |
8b13229b | 67 | (EFIAPI *EFI_USB_HC_PROTOCOL_GET_STATE)(\r |
d1f95000 | 68 | IN EFI_USB_HC_PROTOCOL *This,\r |
69 | OUT EFI_USB_HC_STATE *State\r | |
70 | );\r | |
71 | \r | |
9095d37b | 72 | /**\r |
d1f95000 | 73 | Sets the USB host controller to a specific state.\r |
9095d37b | 74 | \r |
d1f95000 | 75 | @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r |
9095d37b LG |
76 | @param State Indicates the state of the host controller that will be set.\r |
77 | \r | |
d1f95000 | 78 | @retval EFI_SUCCESS The USB host controller was successfully placed in the state specified by\r |
9095d37b | 79 | State.\r |
d1f95000 | 80 | @retval EFI_INVALID_PARAMETER State is NULL.\r |
9095d37b LG |
81 | @retval EFI_DEVICE_ERROR Failed to set the state specified by State due to device error.\r |
82 | \r | |
d1f95000 | 83 | **/\r |
84 | typedef\r | |
85 | EFI_STATUS\r | |
8b13229b | 86 | (EFIAPI *EFI_USB_HC_PROTOCOL_SET_STATE)(\r |
d1f95000 | 87 | IN EFI_USB_HC_PROTOCOL *This,\r |
88 | IN EFI_USB_HC_STATE State\r | |
89 | );\r | |
90 | \r | |
9095d37b | 91 | /**\r |
d1f95000 | 92 | Submits control transfer to a target USB device.\r |
9095d37b | 93 | \r |
d1f95000 | 94 | @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r |
95 | @param DeviceAddress Represents the address of the target device on the USB, which is\r | |
9095d37b | 96 | assigned during USB enumeration.\r |
d1f95000 | 97 | @param IsSlowDevice Indicates whether the target device is slow device or full-speed\r |
9095d37b LG |
98 | device.\r |
99 | @param MaximumPacketLength Indicates the maximum packet size that the default control\r | |
100 | transfer endpoint is capable of sending or receiving.\r | |
d1f95000 | 101 | @param Request A pointer to the USB device request that will be sent to the USB\r |
102 | device.\r | |
9095d37b | 103 | @param TransferDirection Specifies the data direction for the transfer. There are three\r |
2baabe0d | 104 | values available, EfiUsbDataIn, EfiUsbDataOut and EfiUsbNoData.\r |
9095d37b LG |
105 | @param Data A pointer to the buffer of data that will be transmitted to USB\r |
106 | device or received from USB device.\r | |
d1f95000 | 107 | @param DataLength On input, indicates the size, in bytes, of the data buffer specified\r |
9095d37b LG |
108 | by Data. On output, indicates the amount of data actually\r |
109 | transferred.\r | |
d1f95000 | 110 | @param TimeOut Indicates the maximum time, in milliseconds, which the transfer\r |
9095d37b LG |
111 | is allowed to complete.\r |
112 | @param TransferResult A pointer to the detailed result information generated by this\r | |
d1f95000 | 113 | control transfer.\r |
9095d37b | 114 | \r |
d1f95000 | 115 | @retval EFI_SUCCESS The control transfer was completed successfully.\r |
9095d37b | 116 | @retval EFI_OUT_OF_RESOURCES The control transfer could not be completed due to a lack of resources.\r |
d1f95000 | 117 | @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r |
118 | @retval EFI_TIMEOUT The control transfer failed due to timeout.\r | |
119 | @retval EFI_DEVICE_ERROR The control transfer failed due to host controller or device error.\r | |
9095d37b | 120 | \r |
d1f95000 | 121 | **/\r |
122 | typedef\r | |
123 | EFI_STATUS\r | |
8b13229b | 124 | (EFIAPI *EFI_USB_HC_PROTOCOL_CONTROL_TRANSFER)(\r |
d1f95000 | 125 | IN EFI_USB_HC_PROTOCOL *This,\r |
126 | IN UINT8 DeviceAddress,\r | |
127 | IN BOOLEAN IsSlowDevice,\r | |
128 | IN UINT8 MaximumPacketLength,\r | |
129 | IN EFI_USB_DEVICE_REQUEST *Request,\r | |
130 | IN EFI_USB_DATA_DIRECTION TransferDirection,\r | |
131 | IN OUT VOID *Data OPTIONAL,\r | |
132 | IN OUT UINTN *DataLength OPTIONAL,\r | |
133 | IN UINTN TimeOut,\r | |
134 | OUT UINT32 *TransferResult\r | |
135 | );\r | |
136 | \r | |
9095d37b | 137 | /**\r |
d1f95000 | 138 | Submits bulk transfer to a bulk endpoint of a USB device.\r |
9095d37b | 139 | \r |
d1f95000 | 140 | @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r |
141 | @param DeviceAddress Represents the address of the target device on the USB, which is\r | |
9095d37b LG |
142 | assigned during USB enumeration.\r |
143 | @param EndPointAddress The combination of an endpoint number and an endpoint\r | |
144 | direction of the target USB device. Each endpoint address\r | |
145 | supports data transfer in one direction except the control\r | |
146 | endpoint (whose default endpoint address is 0). It is the\r | |
147 | caller's responsibility to make sure that the EndPointAddress\r | |
148 | represents a bulk endpoint.\r | |
149 | @param MaximumPacketLength Indicates the maximum packet size that the default control\r | |
150 | transfer endpoint is capable of sending or receiving.\r | |
151 | @param Data A pointer to the buffer of data that will be transmitted to USB\r | |
152 | device or received from USB device.\r | |
d1f95000 | 153 | @param DataLength On input, indicates the size, in bytes, of the data buffer specified\r |
9095d37b LG |
154 | by Data. On output, indicates the amount of data actually\r |
155 | transferred.\r | |
156 | @param DataToggle A pointer to the data toggle value.\r | |
d1f95000 | 157 | @param TimeOut Indicates the maximum time, in milliseconds, which the transfer\r |
9095d37b | 158 | is allowed to complete.\r |
d1f95000 | 159 | @param TransferResult A pointer to the detailed result information of the bulk transfer.\r |
9095d37b | 160 | \r |
d1f95000 | 161 | @retval EFI_SUCCESS The bulk transfer was completed successfully.\r |
9095d37b | 162 | @retval EFI_OUT_OF_RESOURCES The bulk transfer could not be completed due to a lack of resources.\r |
d1f95000 | 163 | @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r |
164 | @retval EFI_TIMEOUT The bulk transfer failed due to timeout.\r | |
165 | @retval EFI_DEVICE_ERROR The bulk transfer failed due to host controller or device error.\r | |
9095d37b | 166 | \r |
d1f95000 | 167 | **/\r |
168 | typedef\r | |
169 | EFI_STATUS\r | |
8b13229b | 170 | (EFIAPI *EFI_USB_HC_PROTOCOL_BULK_TRANSFER)(\r |
d1f95000 | 171 | IN EFI_USB_HC_PROTOCOL *This,\r |
172 | IN UINT8 DeviceAddress,\r | |
173 | IN UINT8 EndPointAddress,\r | |
174 | IN UINT8 MaximumPacketLength,\r | |
175 | IN OUT VOID *Data,\r | |
176 | IN OUT UINTN *DataLength,\r | |
177 | IN OUT UINT8 *DataToggle,\r | |
178 | IN UINTN TimeOut,\r | |
179 | OUT UINT32 *TransferResult\r | |
180 | );\r | |
181 | \r | |
9095d37b | 182 | /**\r |
d1f95000 | 183 | Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device.\r |
9095d37b | 184 | \r |
d1f95000 | 185 | @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r |
186 | @param DeviceAddress Represents the address of the target device on the USB, which is\r | |
9095d37b | 187 | assigned during USB enumeration.\r |
09254044 | 188 | @param EndPointAddress The combination of an endpoint number and an endpoint\r |
189 | direction of the target USB device. Each endpoint address\r | |
190 | supports data transfer in one direction except the control\r | |
191 | endpoint (whose default endpoint address is zero). It is the\r | |
e9e65e2a | 192 | caller's responsibility to make sure that the\r |
9095d37b | 193 | EndPointAddress represents an interrupt endpoint.\r |
d1f95000 | 194 | @param IsSlowDevice Indicates whether the target device is slow device or full-speed\r |
9095d37b LG |
195 | device.\r |
196 | @param MaximumPacketLength Indicates the maximum packet size that the default control\r | |
197 | transfer endpoint is capable of sending or receiving.\r | |
198 | @param IsNewTransfer If TRUE, an asynchronous interrupt pipe is built between the host\r | |
199 | and the target interrupt endpoint. If FALSE, the specified asynchronous\r | |
200 | interrupt pipe is canceled. If TRUE, and an interrupt transfer exists\r | |
201 | for the target end point, then EFI_INVALID_PARAMETER is returned.\r | |
202 | @param DataToggle A pointer to the data toggle value. On input, it is valid when\r | |
203 | IsNewTransfer is TRUE, and it indicates the initial data toggle\r | |
204 | value the asynchronous interrupt transfer should adopt. On output,\r | |
205 | it is valid when IsNewTransfer is FALSE, and it is updated to indicate\r | |
206 | the data toggle value of the subsequent asynchronous interrupt transfer.\r | |
d1f95000 | 207 | @param PollingInterval Indicates the interval, in milliseconds, that the asynchronous\r |
9095d37b | 208 | interrupt transfer is polled.\r |
d1f95000 | 209 | @param DataLength Indicates the length of data to be received at the rate specified by\r |
9095d37b LG |
210 | PollingInterval from the target asynchronous interrupt\r |
211 | endpoint. This parameter is only required when IsNewTransfer is TRUE.\r | |
212 | @param CallBackFunction The Callback function. This function is called at the rate specified by\r | |
213 | PollingInterval. This parameter is only required when IsNewTransfer is TRUE.\r | |
d1f95000 | 214 | @param Context The context that is passed to the CallBackFunction.\r |
9095d37b | 215 | \r |
d1f95000 | 216 | @retval EFI_SUCCESS The asynchronous interrupt transfer request has been successfully\r |
9095d37b LG |
217 | submitted or canceled.\r |
218 | @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r | |
d1f95000 | 219 | @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r |
220 | @retval EFI_TIMEOUT The bulk transfer failed due to timeout.\r | |
221 | @retval EFI_DEVICE_ERROR The bulk transfer failed due to host controller or device error.\r | |
9095d37b | 222 | \r |
d1f95000 | 223 | **/\r |
224 | typedef\r | |
225 | EFI_STATUS\r | |
8b13229b | 226 | (EFIAPI *EFI_USB_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER)(\r |
d1f95000 | 227 | IN EFI_USB_HC_PROTOCOL *This,\r |
228 | IN UINT8 DeviceAddress,\r | |
229 | IN UINT8 EndPointAddress,\r | |
230 | IN BOOLEAN IsSlowDevice,\r | |
231 | IN UINT8 MaxiumPacketLength,\r | |
232 | IN BOOLEAN IsNewTransfer,\r | |
233 | IN OUT UINT8 *DataToggle,\r | |
234 | IN UINTN PollingInterval OPTIONAL,\r | |
235 | IN UINTN DataLength OPTIONAL,\r | |
236 | IN EFI_ASYNC_USB_TRANSFER_CALLBACK CallBackFunction OPTIONAL,\r | |
237 | IN VOID *Context OPTIONAL\r | |
238 | );\r | |
239 | \r | |
9095d37b | 240 | /**\r |
d1f95000 | 241 | Submits synchronous interrupt transfer to an interrupt endpoint of a USB device.\r |
9095d37b | 242 | \r |
d1f95000 | 243 | @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r |
244 | @param DeviceAddress Represents the address of the target device on the USB, which is\r | |
9095d37b | 245 | assigned during USB enumeration.\r |
09254044 | 246 | @param EndPointAddress The combination of an endpoint number and an endpoint\r |
247 | direction of the target USB device. Each endpoint address\r | |
248 | supports data transfer in one direction except the control\r | |
249 | endpoint (whose default endpoint address is zero). It is the\r | |
e9e65e2a | 250 | caller's responsibility to make sure that the\r |
9095d37b | 251 | EndPointAddress represents an interrupt endpoint.\r |
d1f95000 | 252 | @param IsSlowDevice Indicates whether the target device is slow device or full-speed\r |
9095d37b LG |
253 | device.\r |
254 | @param MaximumPacketLength Indicates the maximum packet size that the default control\r | |
255 | transfer endpoint is capable of sending or receiving.\r | |
d1f95000 | 256 | @param Data A pointer to the buffer of data that will be transmitted to USB\r |
9095d37b | 257 | device or received from USB device. asynchronous interrupt pipe is canceled.\r |
d1f95000 | 258 | @param DataLength On input, the size, in bytes, of the data buffer specified by Data.\r |
9095d37b LG |
259 | On output, the number of bytes transferred.\r |
260 | @param DataToggle A pointer to the data toggle value. On input, it indicates the initial\r | |
261 | data toggle value the synchronous interrupt transfer should adopt;\r | |
262 | on output, it is updated to indicate the data toggle value of the\r | |
263 | subsequent synchronous interrupt transfer.\r | |
264 | @param TimeOut Indicates the maximum time, in milliseconds, which the transfer\r | |
265 | is allowed to complete.\r | |
d1f95000 | 266 | @param TransferResult A pointer to the detailed result information from the synchronous\r |
267 | interrupt transfer.\r | |
9095d37b | 268 | \r |
d1f95000 | 269 | @retval EFI_SUCCESS The synchronous interrupt transfer was completed successfully.\r |
9095d37b | 270 | @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r |
d1f95000 | 271 | @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r |
272 | @retval EFI_TIMEOUT The synchronous interrupt transfer failed due to timeout.\r | |
273 | @retval EFI_DEVICE_ERROR The synchronous interrupt transfer failed due to host controller or device error.\r | |
9095d37b | 274 | \r |
d1f95000 | 275 | **/\r |
276 | typedef\r | |
277 | EFI_STATUS\r | |
8b13229b | 278 | (EFIAPI *EFI_USB_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER)(\r |
d1f95000 | 279 | IN EFI_USB_HC_PROTOCOL *This,\r |
280 | IN UINT8 DeviceAddress,\r | |
281 | IN UINT8 EndPointAddress,\r | |
282 | IN BOOLEAN IsSlowDevice,\r | |
283 | IN UINT8 MaximumPacketLength,\r | |
284 | IN OUT VOID *Data,\r | |
285 | IN OUT UINTN *DataLength,\r | |
286 | IN OUT UINT8 *DataToggle,\r | |
287 | IN UINTN TimeOut,\r | |
288 | OUT UINT32 *TransferResult\r | |
289 | );\r | |
290 | \r | |
9095d37b | 291 | /**\r |
d1f95000 | 292 | Submits isochronous transfer to an isochronous endpoint of a USB device.\r |
9095d37b | 293 | \r |
d1f95000 | 294 | @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r |
295 | @param DeviceAddress Represents the address of the target device on the USB, which is\r | |
9095d37b | 296 | assigned during USB enumeration.\r |
09254044 | 297 | @param EndPointAddress The combination of an endpoint number and an endpoint\r |
298 | direction of the target USB device. Each endpoint address\r | |
299 | supports data transfer in one direction except the control\r | |
e9e65e2a | 300 | endpoint (whose default endpoint address is 0). It is the caller's\r |
09254044 | 301 | responsibility to make sure that the EndPointAddress\r |
9095d37b LG |
302 | represents an isochronous endpoint.\r |
303 | @param MaximumPacketLength Indicates the maximum packet size that the default control\r | |
304 | transfer endpoint is capable of sending or receiving.\r | |
d1f95000 | 305 | @param Data A pointer to the buffer of data that will be transmitted to USB\r |
9095d37b | 306 | device or received from USB device. asynchronous interrupt pipe is canceled.\r |
d1f95000 | 307 | @param DataLength Specifies the length, in bytes, of the data to be sent to or received\r |
9095d37b | 308 | from the USB device.\r |
d1f95000 | 309 | @param TransferResult A pointer to the detailed result information from the isochronous\r |
310 | transfer.\r | |
9095d37b | 311 | \r |
d1f95000 | 312 | @retval EFI_SUCCESS The isochronous transfer was completed successfully.\r |
9095d37b | 313 | @retval EFI_OUT_OF_RESOURCES The isochronous could not be completed due to a lack of resources.\r |
d1f95000 | 314 | @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r |
315 | @retval EFI_TIMEOUT The isochronous transfer failed due to timeout.\r | |
316 | @retval EFI_DEVICE_ERROR The isochronous transfer failed due to host controller or device error.\r | |
9095d37b | 317 | \r |
d1f95000 | 318 | **/\r |
319 | typedef\r | |
320 | EFI_STATUS\r | |
8b13229b | 321 | (EFIAPI *EFI_USB_HC_PROTOCOL_ISOCHRONOUS_TRANSFER)(\r |
d1f95000 | 322 | IN EFI_USB_HC_PROTOCOL *This,\r |
323 | IN UINT8 DeviceAddress,\r | |
324 | IN UINT8 EndPointAddress,\r | |
325 | IN UINT8 MaximumPacketLength,\r | |
326 | IN OUT VOID *Data,\r | |
327 | IN UINTN DataLength,\r | |
328 | OUT UINT32 *TransferResult\r | |
329 | );\r | |
330 | \r | |
9095d37b | 331 | /**\r |
d1f95000 | 332 | Submits nonblocking isochronous transfer to an isochronous endpoint of a USB device.\r |
9095d37b | 333 | \r |
d1f95000 | 334 | @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r |
335 | @param DeviceAddress Represents the address of the target device on the USB, which is\r | |
9095d37b | 336 | assigned during USB enumeration.\r |
09254044 | 337 | @param EndPointAddress The combination of an endpoint number and an endpoint\r |
338 | direction of the target USB device. Each endpoint address\r | |
339 | supports data transfer in one direction except the control\r | |
340 | endpoint (whose default endpoint address is zero). It is the\r | |
e9e65e2a | 341 | caller's responsibility to make sure that the\r |
9095d37b LG |
342 | EndPointAddress represents an isochronous endpoint.\r |
343 | @param MaximumPacketLength Indicates the maximum packet size that the default control\r | |
344 | transfer endpoint is capable of sending or receiving. For isochronous\r | |
345 | endpoints, this value is used to reserve the bus time in the schedule,\r | |
2baabe0d | 346 | required for the perframe data payloads. The pipe may, on an ongoing basis,\r |
9095d37b | 347 | actually use less bandwidth than that reserved.\r |
d1f95000 | 348 | @param Data A pointer to the buffer of data that will be transmitted to USB\r |
9095d37b | 349 | device or received from USB device. asynchronous interrupt pipe is canceled.\r |
d1f95000 | 350 | @param DataLength Specifies the length, in bytes, of the data to be sent to or received\r |
9095d37b | 351 | from the USB device.\r |
2baabe0d | 352 | @param IsochronousCallback The Callback function.This function is called if the requested\r |
353 | isochronous transfer is completed.\r | |
d1f95000 | 354 | @param Context Data passed to the IsochronousCallback function. This is\r |
355 | an optional parameter and may be NULL.\r | |
9095d37b | 356 | \r |
d1f95000 | 357 | @retval EFI_SUCCESS The asynchronous isochronous transfer was completed successfully.\r |
9095d37b | 358 | @retval EFI_OUT_OF_RESOURCES The asynchronous isochronous could not be completed due to a lack of resources.\r |
d1f95000 | 359 | @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r |
9095d37b | 360 | \r |
d1f95000 | 361 | **/\r |
362 | typedef\r | |
363 | EFI_STATUS\r | |
8b13229b | 364 | (EFIAPI *EFI_USB_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER)(\r |
d1f95000 | 365 | IN EFI_USB_HC_PROTOCOL *This,\r |
366 | IN UINT8 DeviceAddress,\r | |
367 | IN UINT8 EndPointAddress,\r | |
368 | IN UINT8 MaximumPacketLength,\r | |
369 | IN OUT VOID *Data,\r | |
370 | IN UINTN DataLength,\r | |
371 | IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack,\r | |
372 | IN VOID *Context OPTIONAL\r | |
373 | );\r | |
374 | \r | |
9095d37b | 375 | /**\r |
d1f95000 | 376 | Retrieves the number of root hub ports.\r |
9095d37b | 377 | \r |
d1f95000 | 378 | @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r |
9095d37b LG |
379 | @param PortNumber A pointer to the number of the root hub ports.\r |
380 | \r | |
d1f95000 | 381 | @retval EFI_SUCCESS The port number was retrieved successfully.\r |
382 | @retval EFI_DEVICE_ERROR An error was encountered while attempting to retrieve the port number.\r | |
383 | @retval EFI_INVALID_PARAMETER PortNumber is NULL.\r | |
9095d37b | 384 | \r |
d1f95000 | 385 | **/\r |
386 | typedef\r | |
387 | EFI_STATUS\r | |
8b13229b | 388 | (EFIAPI *EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_NUMBER)(\r |
d1f95000 | 389 | IN EFI_USB_HC_PROTOCOL *This,\r |
390 | OUT UINT8 *PortNumber\r | |
391 | );\r | |
392 | \r | |
9095d37b | 393 | /**\r |
d1f95000 | 394 | Retrieves the current status of a USB root hub port.\r |
9095d37b | 395 | \r |
d1f95000 | 396 | @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r |
397 | @param PortNumber Specifies the root hub port from which the status is to be retrieved.\r | |
2baabe0d | 398 | This value is zero based. For example, if a root hub has two ports,\r |
399 | then the first port is numbered 0, and the second port is\r | |
400 | numbered 1.\r | |
9095d37b LG |
401 | @param PortStatus A pointer to the current port status bits and port status change bits.\r |
402 | \r | |
d1f95000 | 403 | @retval EFI_SUCCESS The status of the USB root hub port specified by PortNumber\r |
9095d37b | 404 | was returned in PortStatus.\r |
d1f95000 | 405 | @retval EFI_INVALID_PARAMETER PortNumber is invalid.\r |
9095d37b | 406 | \r |
d1f95000 | 407 | **/\r |
408 | typedef\r | |
409 | EFI_STATUS\r | |
8b13229b | 410 | (EFIAPI *EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS)(\r |
d1f95000 | 411 | IN EFI_USB_HC_PROTOCOL *This,\r |
412 | IN UINT8 PortNumber,\r | |
413 | OUT EFI_USB_PORT_STATUS *PortStatus\r | |
414 | );\r | |
415 | \r | |
9095d37b | 416 | /**\r |
d1f95000 | 417 | Sets a feature for the specified root hub port.\r |
9095d37b | 418 | \r |
d1f95000 | 419 | @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r |
420 | @param PortNumber Specifies the root hub port from which the status is to be retrieved.\r | |
2baabe0d | 421 | This value is zero based. For example, if a root hub has two ports,\r |
422 | then the first port is numbered 0, and the second port is\r | |
423 | numbered 1.\r | |
d1f95000 | 424 | @param PortFeature Indicates the feature selector associated with the feature set\r |
425 | request.\r | |
9095d37b | 426 | \r |
d1f95000 | 427 | @retval EFI_SUCCESS The feature specified by PortFeature was set for the USB\r |
9095d37b | 428 | root hub port specified by PortNumber.\r |
d1f95000 | 429 | @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid for this function.\r |
9095d37b | 430 | \r |
d1f95000 | 431 | **/\r |
432 | typedef\r | |
433 | EFI_STATUS\r | |
8b13229b | 434 | (EFIAPI *EFI_USB_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE)(\r |
d1f95000 | 435 | IN EFI_USB_HC_PROTOCOL *This,\r |
436 | IN UINT8 PortNumber,\r | |
437 | IN EFI_USB_PORT_FEATURE PortFeature\r | |
438 | );\r | |
439 | \r | |
9095d37b | 440 | /**\r |
d1f95000 | 441 | Clears a feature for the specified root hub port.\r |
9095d37b | 442 | \r |
d1f95000 | 443 | @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r |
2baabe0d | 444 | @param PortNumber Specifies the root hub port from which the status is to be retrieved.\r |
445 | This value is zero based. For example, if a root hub has two ports,\r | |
446 | then the first port is numbered 0, and the second port is\r | |
447 | numbered 1.\r | |
d1f95000 | 448 | @param PortFeature Indicates the feature selector associated with the feature clear\r |
449 | request.\r | |
9095d37b | 450 | \r |
d1f95000 | 451 | @retval EFI_SUCCESS The feature specified by PortFeature was cleared for the USB\r |
9095d37b | 452 | root hub port specified by PortNumber.\r |
d1f95000 | 453 | @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid for this function.\r |
9095d37b | 454 | \r |
d1f95000 | 455 | **/\r |
456 | typedef\r | |
457 | EFI_STATUS\r | |
8b13229b | 458 | (EFIAPI *EFI_USB_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE)(\r |
d1f95000 | 459 | IN EFI_USB_HC_PROTOCOL *This,\r |
460 | IN UINT8 PortNumber,\r | |
461 | IN EFI_USB_PORT_FEATURE PortFeature\r | |
462 | );\r | |
463 | \r | |
4ca9b6c4 | 464 | \r |
44717a39 | 465 | ///\r |
466 | /// The EFI_USB_HC_PROTOCOL provides USB host controller management, basic data transactions\r | |
467 | /// over a USB bus, and USB root hub access. A device driver that wishes to manage a USB bus in a\r | |
468 | /// system retrieves the EFI_USB_HC_PROTOCOL instance that is associated with the USB bus to be\r | |
469 | /// managed. A device handle for a USB host controller will minimally contain an\r | |
9095d37b | 470 | /// EFI_DEVICE_PATH_PROTOCOL instance, and an EFI_USB_HC_PROTOCOL instance.\r |
44717a39 | 471 | ///\r |
d1f95000 | 472 | struct _EFI_USB_HC_PROTOCOL {\r |
473 | EFI_USB_HC_PROTOCOL_RESET Reset;\r | |
474 | EFI_USB_HC_PROTOCOL_GET_STATE GetState;\r | |
475 | EFI_USB_HC_PROTOCOL_SET_STATE SetState;\r | |
476 | EFI_USB_HC_PROTOCOL_CONTROL_TRANSFER ControlTransfer;\r | |
477 | EFI_USB_HC_PROTOCOL_BULK_TRANSFER BulkTransfer;\r | |
478 | EFI_USB_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER AsyncInterruptTransfer;\r | |
479 | EFI_USB_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER SyncInterruptTransfer;\r | |
480 | EFI_USB_HC_PROTOCOL_ISOCHRONOUS_TRANSFER IsochronousTransfer;\r | |
481 | EFI_USB_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER AsyncIsochronousTransfer;\r | |
482 | EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_NUMBER GetRootHubPortNumber;\r | |
483 | EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS GetRootHubPortStatus;\r | |
484 | EFI_USB_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE SetRootHubPortFeature;\r | |
485 | EFI_USB_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE ClearRootHubPortFeature;\r | |
258cce13 | 486 | ///\r |
9095d37b LG |
487 | /// The major revision number of the USB host controller. The revision information\r |
488 | /// indicates the release of the Universal Serial Bus Specification with which the\r | |
258cce13 | 489 | /// host controller is compliant.\r |
9095d37b | 490 | ///\r |
d1f95000 | 491 | UINT16 MajorRevision;\r |
258cce13 | 492 | ///\r |
9095d37b LG |
493 | /// The minor revision number of the USB host controller. The revision information\r |
494 | /// indicates the release of the Universal Serial Bus Specification with which the\r | |
495 | /// host controller is compliant.\r | |
496 | ///\r | |
d1f95000 | 497 | UINT16 MinorRevision;\r |
498 | };\r | |
499 | \r | |
500 | extern EFI_GUID gEfiUsbHcProtocolGuid;\r | |
501 | \r | |
502 | #endif\r |