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