]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | EFI_USB2_HC_PROTOCOL as defined in UEFI 2.0.\r | |
3 | \r | |
4 | Copyright (c) 2006, Intel Corporation \r | |
5 | All rights reserved. This program and the accompanying materials \r | |
6 | are licensed and made available under the terms and conditions of the BSD License \r | |
7 | which accompanies this distribution. The full text of the license may be found at \r | |
8 | http://opensource.org/licenses/bsd-license.php \r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
12 | \r | |
13 | Module Name: Usb2HostController.h\r | |
14 | \r | |
15 | **/\r | |
16 | \r | |
17 | #ifndef _USB2_HOSTCONTROLLER_H_\r | |
18 | #define _USB2_HOSTCONTROLLER_H_\r | |
19 | \r | |
20 | #define EFI_USB2_HC_PROTOCOL_GUID \\r | |
21 | { \\r | |
22 | 0x3e745226, 0x9818, 0x45b6, {0xa2, 0xac, 0xd7, 0xcd, 0xe, 0x8b, 0xa2, 0xbc } \\r | |
23 | }\r | |
24 | \r | |
25 | //\r | |
26 | // Forward reference for pure ANSI compatability\r | |
27 | //\r | |
28 | typedef struct _EFI_USB2_HC_PROTOCOL EFI_USB2_HC_PROTOCOL;\r | |
29 | \r | |
30 | #define EFI_USB_SPEED_FULL 0x0000 // 12 Mb/s, USB 1.1 OHCI and UHCI HC.\r | |
31 | #define EFI_USB_SPEED_LOW 0x0001 // 1 Mb/s, USB 1.1 OHCI and UHCI HC.\r | |
32 | #define EFI_USB_SPEED_HIGH 0x0002 // 480 Mb/s, USB 2.0 EHCI HC.\r | |
33 | \r | |
34 | typedef struct {\r | |
35 | UINT8 TranslatorHubAddress;\r | |
36 | UINT8 TranslatorPortNumber;\r | |
37 | } EFI_USB2_HC_TRANSACTION_TRANSLATOR;\r | |
38 | \r | |
39 | //\r | |
40 | // Protocol definitions\r | |
41 | //\r | |
42 | \r | |
43 | /**\r | |
44 | Retrieves the Host Controller capabilities.\r | |
45 | \r | |
46 | @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r | |
47 | @param MaxSpeed Host controller data transfer speed.\r | |
48 | @param PortNumber Number of the root hub ports.\r | |
49 | @param Is64BitCapable TRUE if controller supports 64-bit memory addressing,\r | |
50 | FALSE otherwise.\r | |
51 | \r | |
52 | @retval EFI_SUCCESS The host controller capabilities were retrieved successfully.\r | |
53 | @retval EFI_INVALID_PARAMETER One of the input args was NULL.\r | |
54 | @retval EFI_DEVICE_ERROR An error was encountered while attempting to\r | |
55 | retrieve the capabilities.\r | |
56 | \r | |
57 | **/\r | |
58 | typedef\r | |
59 | EFI_STATUS\r | |
60 | (EFIAPI *EFI_USB2_HC_PROTOCOL_GET_CAPABILITY) (\r | |
61 | IN EFI_USB2_HC_PROTOCOL *This,\r | |
62 | OUT UINT8 *MaxSpeed,\r | |
63 | OUT UINT8 *PortNumber,\r | |
64 | OUT UINT8 *Is64BitCapable\r | |
65 | )\r | |
66 | ;\r | |
67 | \r | |
68 | /**\r | |
69 | Provides software reset for the USB host controller.\r | |
70 | \r | |
71 | @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r | |
72 | @param Attributes A bit mask of the reset operation to perform.\r | |
73 | \r | |
74 | @retval EFI_SUCCESS The reset operation succeeded.\r | |
75 | @retval EFI_INVALID_PARAMETER Attributes is not valid.\r | |
76 | @retval EFI_UNSUPPORTED The type of reset specified by Attributes is not currently\r | |
77 | supported by the host controller hardware.\r | |
78 | @retval EFI_ACCESS_DENIED Reset operation is rejected due to the debug port being configured\r | |
79 | and active; only EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG or\r | |
80 | EFI_USB_HC_RESET_HOST_WITH_DEBUG reset Attributes can be used to\r | |
81 | perform reset operation for this host controller.\r | |
82 | @retval EFI_DEVICE_ERROR An error was encountered while attempting to\r | |
83 | retrieve the capabilities.\r | |
84 | \r | |
85 | **/\r | |
86 | typedef\r | |
87 | EFI_STATUS\r | |
88 | (EFIAPI *EFI_USB2_HC_PROTOCOL_RESET) (\r | |
89 | IN EFI_USB2_HC_PROTOCOL *This,\r | |
90 | IN UINT16 Attributes\r | |
91 | )\r | |
92 | ;\r | |
93 | \r | |
94 | /**\r | |
95 | Retrieves current state of the USB host controller.\r | |
96 | \r | |
97 | @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r | |
98 | @param State A pointer to the EFI_USB_HC_STATE data structure that\r | |
99 | indicates current state of the USB host controller.\r | |
100 | \r | |
101 | @retval EFI_SUCCESS The state information of the host controller was returned in State.\r | |
102 | @retval EFI_INVALID_PARAMETER State is NULL.\r | |
103 | @retval EFI_DEVICE_ERROR An error was encountered while attempting to retrieve the\r | |
104 | host controller's current state.\r | |
105 | \r | |
106 | **/\r | |
107 | typedef\r | |
108 | EFI_STATUS\r | |
109 | (EFIAPI *EFI_USB2_HC_PROTOCOL_GET_STATE) (\r | |
110 | IN EFI_USB2_HC_PROTOCOL *This,\r | |
111 | OUT EFI_USB_HC_STATE *State\r | |
112 | )\r | |
113 | ; \r | |
114 | \r | |
115 | /**\r | |
116 | Sets the USB host controller to a specific state.\r | |
117 | \r | |
118 | @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r | |
119 | @param State Indicates the state of the host controller that will be set.\r | |
120 | \r | |
121 | @retval EFI_SUCCESS The USB host controller was successfully placed in the state\r | |
122 | specified by State.\r | |
123 | @retval EFI_INVALID_PARAMETER State is not valid.\r | |
124 | @retval EFI_DEVICE_ERROR Failed to set the state specified by State due to device error.\r | |
125 | \r | |
126 | **/\r | |
127 | typedef\r | |
128 | EFI_STATUS\r | |
129 | (EFIAPI *EFI_USB2_HC_PROTOCOL_SET_STATE) (\r | |
130 | IN EFI_USB2_HC_PROTOCOL *This,\r | |
131 | IN EFI_USB_HC_STATE State\r | |
132 | )\r | |
133 | ;\r | |
134 | \r | |
135 | /**\r | |
136 | Submits control transfer to a target USB device.\r | |
137 | \r | |
138 | @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r | |
139 | @param DeviceAddress Represents the address of the target device on the USB.\r | |
140 | @param DeviceSpeed Indicates device speed.\r | |
141 | @param MaximumPacketLength Indicates the maximum packet size that the default control transfer\r | |
142 | endpoint is capable of sending or receiving.\r | |
143 | @param Request A pointer to the USB device request that will be sent to the USB device.\r | |
144 | @param TransferDirection Specifies the data direction for the transfer. There are three values\r | |
145 | available, EfiUsbDataIn, EfiUsbDataOut and EfiUsbNoData.\r | |
146 | @param Data A pointer to the buffer of data that will be transmitted to USB device or\r | |
147 | received from USB device.\r | |
148 | @param DataLength On input, indicates the size, in bytes, of the data buffer specified by Data.\r | |
149 | On output, indicates the amount of data actually transferred.\r | |
150 | @param Translator A pointer to the transaction translator data.\r | |
151 | @param TimeOut Indicates the maximum time, in milliseconds, which the transfer is\r | |
152 | allowed to complete.\r | |
153 | @param TransferResult A pointer to the detailed result information generated by this control\r | |
154 | transfer.\r | |
155 | \r | |
156 | @retval EFI_SUCCESS The control transfer was completed successfully.\r | |
157 | @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r | |
158 | @retval EFI_OUT_OF_RESOURCES The control transfer could not be completed due to a lack of resources.\r | |
159 | @retval EFI_TIMEOUT The control transfer failed due to timeout.\r | |
160 | @retval EFI_DEVICE_ERROR The control transfer failed due to host controller or device error.\r | |
161 | Caller should check TransferResult for detailed error information.\r | |
162 | \r | |
163 | **/\r | |
164 | typedef\r | |
165 | EFI_STATUS\r | |
166 | (EFIAPI *EFI_USB2_HC_PROTOCOL_CONTROL_TRANSFER) (\r | |
167 | IN EFI_USB2_HC_PROTOCOL *This,\r | |
168 | IN UINT8 DeviceAddress,\r | |
169 | IN UINT8 DeviceSpeed,\r | |
170 | IN UINTN MaximumPacketLength,\r | |
171 | IN EFI_USB_DEVICE_REQUEST *Request,\r | |
172 | IN EFI_USB_DATA_DIRECTION TransferDirection,\r | |
173 | IN OUT VOID *Data OPTIONAL,\r | |
174 | IN OUT UINTN *DataLength OPTIONAL,\r | |
175 | IN UINTN TimeOut,\r | |
176 | IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,\r | |
177 | OUT UINT32 *TransferResult\r | |
178 | )\r | |
179 | ; \r | |
180 | \r | |
181 | #define EFI_USB_MAX_BULK_BUFFER_NUM 10\r | |
182 | \r | |
183 | /**\r | |
184 | Submits bulk transfer to a bulk endpoint of a USB device.\r | |
185 | \r | |
186 | @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r | |
187 | @param DeviceAddress Represents the address of the target device on the USB.\r | |
188 | @param EndPointAddress The combination of an endpoint number and an endpoint direction of the\r | |
189 | target USB device.\r | |
190 | @param DeviceSpeed Indicates device speed.\r | |
191 | @param MaximumPacketLength Indicates the maximum packet size the target endpoint is capable of\r | |
192 | sending or receiving.\r | |
193 | @param DataBuffersNumber Number of data buffers prepared for the transfer.\r | |
194 | @param Data Array of pointers to the buffers of data that will be transmitted to USB\r | |
195 | device or received from USB device.\r | |
196 | @param DataLength When input, indicates the size, in bytes, of the data buffers specified by\r | |
197 | Data. When output, indicates the actually transferred data size.\r | |
198 | @param DataToggle A pointer to the data toggle value.\r | |
199 | @param Translator A pointer to the transaction translator data.\r | |
200 | @param TimeOut Indicates the maximum time, in milliseconds, which the transfer is\r | |
201 | allowed to complete.\r | |
202 | @param TransferResult A pointer to the detailed result information of the bulk transfer.\r | |
203 | \r | |
204 | @retval EFI_SUCCESS The bulk transfer was completed successfully.\r | |
205 | @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r | |
206 | @retval EFI_OUT_OF_RESOURCES The bulk transfer could not be submitted due to a lack of resources.\r | |
207 | @retval EFI_TIMEOUT The bulk transfer failed due to timeout.\r | |
208 | @retval EFI_DEVICE_ERROR The bulk transfer failed due to host controller or device error.\r | |
209 | Caller should check TransferResult for detailed error information.\r | |
210 | \r | |
211 | **/\r | |
212 | typedef\r | |
213 | EFI_STATUS\r | |
214 | (EFIAPI *EFI_USB2_HC_PROTOCOL_BULK_TRANSFER) (\r | |
215 | IN EFI_USB2_HC_PROTOCOL *This,\r | |
216 | IN UINT8 DeviceAddress,\r | |
217 | IN UINT8 EndPointAddress,\r | |
218 | IN UINT8 DeviceSpeed,\r | |
219 | IN UINTN MaximumPacketLength,\r | |
220 | IN UINT8 DataBuffersNumber,\r | |
221 | IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM],\r | |
222 | IN OUT UINTN *DataLength,\r | |
223 | IN OUT UINT8 *DataToggle,\r | |
224 | IN UINTN TimeOut,\r | |
225 | IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,\r | |
226 | OUT UINT32 *TransferResult\r | |
227 | )\r | |
228 | ;\r | |
229 | \r | |
230 | /**\r | |
231 | Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device.\r | |
232 | Translator parameter doesn't exist in UEFI2.0 spec, but it will be updated in the following specification version.\r | |
233 | \r | |
234 | @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r | |
235 | @param DeviceAddress Represents the address of the target device on the USB.\r | |
236 | @param EndPointAddress The combination of an endpoint number and an endpoint direction of the\r | |
237 | target USB device.\r | |
238 | @param DeviceSpeed Indicates device speed.\r | |
239 | @param MaximumPacketLength Indicates the maximum packet size the target endpoint is capable of\r | |
240 | sending or receiving.\r | |
241 | @param IsNewTransfer If TRUE, an asynchronous interrupt pipe is built between the host and the\r | |
242 | target interrupt endpoint. If FALSE, the specified asynchronous interrupt\r | |
243 | pipe is canceled. If TRUE, and an interrupt transfer exists for the target\r | |
244 | end point, then EFI_INVALID_PARAMETER is returned.\r | |
245 | @param DataToggle A pointer to the data toggle value.\r | |
246 | @param PollingInterval Indicates the interval, in milliseconds, that the asynchronous interrupt\r | |
247 | transfer is polled.\r | |
248 | @param DataLength Indicates the length of data to be received at the rate specified by\r | |
249 | PollingInterval from the target asynchronous interrupt endpoint.\r | |
250 | @param Translator A pointr to the transaction translator data.\r | |
251 | @param CallBackFunction The Callback function. This function is called at the rate specified by\r | |
252 | PollingInterval.\r | |
253 | @param Context The context that is passed to the CallBackFunction. This is an\r | |
254 | optional parameter and may be NULL.\r | |
255 | \r | |
256 | @retval EFI_SUCCESS The asynchronous interrupt transfer request has been successfully\r | |
257 | submitted or canceled.\r | |
258 | @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r | |
259 | @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r | |
260 | \r | |
261 | **/\r | |
262 | typedef\r | |
263 | EFI_STATUS\r | |
264 | (EFIAPI *EFI_USB2_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER) (\r | |
265 | IN EFI_USB2_HC_PROTOCOL *This,\r | |
266 | IN UINT8 DeviceAddress,\r | |
267 | IN UINT8 EndPointAddress,\r | |
268 | IN UINT8 DeviceSpeed,\r | |
269 | IN UINTN MaxiumPacketLength,\r | |
270 | IN BOOLEAN IsNewTransfer,\r | |
271 | IN OUT UINT8 *DataToggle,\r | |
272 | IN UINTN PollingInterval OPTIONAL,\r | |
273 | IN UINTN DataLength OPTIONAL,\r | |
274 | IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator OPTIONAL,\r | |
275 | IN EFI_ASYNC_USB_TRANSFER_CALLBACK CallBackFunction OPTIONAL,\r | |
276 | IN VOID *Context OPTIONAL\r | |
277 | )\r | |
278 | ;\r | |
279 | \r | |
280 | /**\r | |
281 | Submits synchronous interrupt transfer to an interrupt endpoint of a USB device.\r | |
282 | Translator parameter doesn't exist in UEFI2.0 spec, but it will be updated in the following specification version.\r | |
283 | \r | |
284 | @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r | |
285 | @param DeviceAddress Represents the address of the target device on the USB.\r | |
286 | @param EndPointAddress The combination of an endpoint number and an endpoint direction of the\r | |
287 | target USB device.\r | |
288 | @param DeviceSpeed Indicates device speed.\r | |
289 | @param MaximumPacketLength Indicates the maximum packet size the target endpoint is capable of\r | |
290 | sending or receiving.\r | |
291 | @param Data A pointer to the buffer of data that will be transmitted to USB device or\r | |
292 | received from USB device.\r | |
293 | @param DataLength On input, the size, in bytes, of the data buffer specified by Data. On\r | |
294 | output, the number of bytes transferred.\r | |
295 | @param DataToggle A pointer to the data toggle value.\r | |
296 | @param TimeOut Indicates the maximum time, in milliseconds, which the transfer is\r | |
297 | allowed to complete.\r | |
298 | @param Translator A pointr to the transaction translator data.\r | |
299 | @param TransferResult A pointer to the detailed result information from the synchronous\r | |
300 | interrupt transfer.\r | |
301 | \r | |
302 | @retval EFI_SUCCESS The synchronous interrupt transfer was completed successfully.\r | |
303 | @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r | |
304 | @retval EFI_OUT_OF_RESOURCES The synchronous interrupt transfer could not be submitted due to a lack of resources.\r | |
305 | @retval EFI_TIMEOUT The synchronous interrupt transfer failed due to timeout.\r | |
306 | @retval EFI_DEVICE_ERROR The synchronous interrupt transfer failed due to host controller or device error.\r | |
307 | Caller should check TransferResult for detailed error information.\r | |
308 | \r | |
309 | **/\r | |
310 | typedef\r | |
311 | EFI_STATUS\r | |
312 | (EFIAPI *EFI_USB2_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER) (\r | |
313 | IN EFI_USB2_HC_PROTOCOL *This,\r | |
314 | IN UINT8 DeviceAddress,\r | |
315 | IN UINT8 EndPointAddress,\r | |
316 | IN UINT8 DeviceSpeed,\r | |
317 | IN UINTN MaximumPacketLength,\r | |
318 | IN OUT VOID *Data,\r | |
319 | IN OUT UINTN *DataLength,\r | |
320 | IN OUT UINT8 *DataToggle,\r | |
321 | IN UINTN TimeOut,\r | |
322 | IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,\r | |
323 | OUT UINT32 *TransferResult\r | |
324 | )\r | |
325 | ;\r | |
326 | \r | |
327 | #define EFI_USB_MAX_ISO_BUFFER_NUM 7\r | |
328 | #define EFI_USB_MAX_ISO_BUFFER_NUM1 2\r | |
329 | \r | |
330 | /**\r | |
331 | Submits isochronous transfer to an isochronous endpoint of a USB device.\r | |
332 | \r | |
333 | @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r | |
334 | @param DeviceAddress Represents the address of the target device on the USB.\r | |
335 | @param EndPointAddress The combination of an endpoint number and an endpoint direction of the\r | |
336 | target USB device.\r | |
337 | @param DeviceSpeed Indicates device speed.\r | |
338 | @param MaximumPacketLength Indicates the maximum packet size the target endpoint is capable of\r | |
339 | sending or receiving.\r | |
340 | @param DataBuffersNumber Number of data buffers prepared for the transfer.\r | |
341 | @param Data Array of pointers to the buffers of data that will be transmitted to USB\r | |
342 | device or received from USB device.\r | |
343 | @param DataLength Specifies the length, in bytes, of the data to be sent to or received from\r | |
344 | the USB device.\r | |
345 | @param Translator A pointer to the transaction translator data.\r | |
346 | @param TransferResult A pointer to the detailed result information of the isochronous transfer.\r | |
347 | \r | |
348 | @retval EFI_SUCCESS The isochronous transfer was completed successfully.\r | |
349 | @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r | |
350 | @retval EFI_OUT_OF_RESOURCES The isochronous transfer could not be submitted due to a lack of resources.\r | |
351 | @retval EFI_TIMEOUT The isochronous transfer cannot be completed within the one USB frame time.\r | |
352 | @retval EFI_DEVICE_ERROR The isochronous transfer failed due to host controller or device error.\r | |
353 | Caller should check TransferResult for detailed error information.\r | |
354 | \r | |
355 | **/\r | |
356 | typedef\r | |
357 | EFI_STATUS\r | |
358 | (EFIAPI *EFI_USB2_HC_PROTOCOL_ISOCHRONOUS_TRANSFER) (\r | |
359 | IN EFI_USB2_HC_PROTOCOL *This,\r | |
360 | IN UINT8 DeviceAddress,\r | |
361 | IN UINT8 EndPointAddress,\r | |
362 | IN UINT8 DeviceSpeed,\r | |
363 | IN UINTN MaximumPacketLength,\r | |
364 | IN UINT8 DataBuffersNumber,\r | |
365 | IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM],\r | |
366 | IN UINTN DataLength,\r | |
367 | IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,\r | |
368 | OUT UINT32 *TransferResult\r | |
369 | )\r | |
370 | ;\r | |
371 | \r | |
372 | /**\r | |
373 | Submits nonblocking isochronous transfer to an isochronous endpoint of a USB device.\r | |
374 | \r | |
375 | @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r | |
376 | @param DeviceAddress Represents the address of the target device on the USB.\r | |
377 | @param EndPointAddress The combination of an endpoint number and an endpoint direction of the\r | |
378 | target USB device.\r | |
379 | @param DeviceSpeed Indicates device speed.\r | |
380 | @param MaximumPacketLength Indicates the maximum packet size the target endpoint is capable of\r | |
381 | sending or receiving.\r | |
382 | @param DataBuffersNumber Number of data buffers prepared for the transfer.\r | |
383 | @param Data Array of pointers to the buffers of data that will be transmitted to USB\r | |
384 | device or received from USB device.\r | |
385 | @param DataLength Specifies the length, in bytes, of the data to be sent to or received from\r | |
386 | the USB device.\r | |
387 | @param Translator A pointer to the transaction translator data.\r | |
388 | @param IsochronousCallback The Callback function. This function is called if the requested\r | |
389 | isochronous transfer is completed.\r | |
390 | @param Context Data passed to the IsochronousCallback function. This is an\r | |
391 | optional parameter and may be NULL.\r | |
392 | \r | |
393 | @retval EFI_SUCCESS The asynchronous isochronous transfer request has been successfully\r | |
394 | submitted or canceled.\r | |
395 | @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r | |
396 | @retval EFI_OUT_OF_RESOURCES The asynchronous isochronous transfer could not be submitted due to\r | |
397 | a lack of resources.\r | |
398 | \r | |
399 | **/\r | |
400 | typedef\r | |
401 | EFI_STATUS\r | |
402 | (EFIAPI *EFI_USB2_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER) (\r | |
403 | IN EFI_USB2_HC_PROTOCOL *This,\r | |
404 | IN UINT8 DeviceAddress,\r | |
405 | IN UINT8 EndPointAddress,\r | |
406 | IN UINT8 DeviceSpeed,\r | |
407 | IN UINTN MaximumPacketLength,\r | |
408 | IN UINT8 DataBuffersNumber,\r | |
409 | IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM],\r | |
410 | IN UINTN DataLength,\r | |
411 | IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,\r | |
412 | IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack,\r | |
413 | IN VOID *Context OPTIONAL\r | |
414 | )\r | |
415 | ;\r | |
416 | \r | |
417 | /**\r | |
418 | Retrieves the current status of a USB root hub port.\r | |
419 | \r | |
420 | @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r | |
421 | @param PortNumber Specifies the root hub port from which the status is to be retrieved.\r | |
422 | This value is zero based.\r | |
423 | @param PortStatus A pointer to the current port status bits and port status change bits.\r | |
424 | \r | |
425 | @retval EFI_SUCCESS The status of the USB root hub port specified by PortNumber\r | |
426 | was returned in PortStatus.\r | |
427 | @retval EFI_INVALID_PARAMETER PortNumber is invalid.\r | |
428 | \r | |
429 | **/\r | |
430 | typedef\r | |
431 | EFI_STATUS\r | |
432 | (EFIAPI *EFI_USB2_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS) (\r | |
433 | IN EFI_USB2_HC_PROTOCOL *This,\r | |
434 | IN UINT8 PortNumber,\r | |
435 | OUT EFI_USB_PORT_STATUS *PortStatus\r | |
436 | )\r | |
437 | ; \r | |
438 | \r | |
439 | /**\r | |
440 | Sets a feature for the specified root hub port.\r | |
441 | \r | |
442 | @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r | |
443 | @param PortNumber Specifies the root hub port whose feature is requested to be set. This\r | |
444 | value is zero based.\r | |
445 | @param PortFeature Indicates the feature selector associated with the feature set request.\r | |
446 | \r | |
447 | @retval EFI_SUCCESS The feature specified by PortFeature was set for the USB\r | |
448 | root hub port specified by PortNumber.\r | |
449 | @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid for this function.\r | |
450 | \r | |
451 | **/\r | |
452 | typedef\r | |
453 | EFI_STATUS\r | |
454 | (EFIAPI *EFI_USB2_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE) (\r | |
455 | IN EFI_USB2_HC_PROTOCOL *This,\r | |
456 | IN UINT8 PortNumber,\r | |
457 | IN EFI_USB_PORT_FEATURE PortFeature\r | |
458 | )\r | |
459 | ; \r | |
460 | \r | |
461 | /**\r | |
462 | Clears a feature for the specified root hub port.\r | |
463 | \r | |
464 | @param This A pointer to the EFI_USB2_HC_PROTOCOL instance.\r | |
465 | @param PortNumber Specifies the root hub port whose feature is requested to be cleared. This\r | |
466 | value is zero based.\r | |
467 | @param PortFeature Indicates the feature selector associated with the feature clear request.\r | |
468 | \r | |
469 | @retval EFI_SUCCESS The feature specified by PortFeature was cleared for the USB\r | |
470 | root hub port specified by PortNumber.\r | |
471 | @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid for this function.\r | |
472 | \r | |
473 | **/\r | |
474 | typedef\r | |
475 | EFI_STATUS\r | |
476 | (EFIAPI *EFI_USB2_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE) (\r | |
477 | IN EFI_USB2_HC_PROTOCOL *This,\r | |
478 | IN UINT8 PortNumber,\r | |
479 | IN EFI_USB_PORT_FEATURE PortFeature\r | |
480 | )\r | |
481 | ; \r | |
482 | \r | |
483 | struct _EFI_USB2_HC_PROTOCOL {\r | |
484 | EFI_USB2_HC_PROTOCOL_GET_CAPABILITY GetCapability;\r | |
485 | EFI_USB2_HC_PROTOCOL_RESET Reset;\r | |
486 | EFI_USB2_HC_PROTOCOL_GET_STATE GetState;\r | |
487 | EFI_USB2_HC_PROTOCOL_SET_STATE SetState;\r | |
488 | EFI_USB2_HC_PROTOCOL_CONTROL_TRANSFER ControlTransfer;\r | |
489 | EFI_USB2_HC_PROTOCOL_BULK_TRANSFER BulkTransfer;\r | |
490 | EFI_USB2_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER AsyncInterruptTransfer;\r | |
491 | EFI_USB2_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER SyncInterruptTransfer;\r | |
492 | EFI_USB2_HC_PROTOCOL_ISOCHRONOUS_TRANSFER IsochronousTransfer;\r | |
493 | EFI_USB2_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER AsyncIsochronousTransfer;\r | |
494 | EFI_USB2_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS GetRootHubPortStatus;\r | |
495 | EFI_USB2_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE SetRootHubPortFeature;\r | |
496 | EFI_USB2_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE ClearRootHubPortFeature;\r | |
497 | UINT16 MajorRevision;\r | |
498 | UINT16 MinorRevision;\r | |
499 | };\r | |
500 | \r | |
501 | extern EFI_GUID gEfiUsb2HcProtocolGuid;\r | |
502 | \r | |
503 | #endif\r |