]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | EFI_USB_HC_PROTOCOL as defined in EFI 1.10.\r | |
3 | \r | |
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 | |
6 | over a USB bus. In addition, it provides an abstraction for the root hub of the USB bus.\r | |
7 | \r | |
8 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r | |
9 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
10 | \r | |
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 | |
23 | ///\r | |
24 | /// Forward reference for pure ANSI compatability\r | |
25 | ///\r | |
26 | typedef struct _EFI_USB_HC_PROTOCOL EFI_USB_HC_PROTOCOL;\r | |
27 | \r | |
28 | //\r | |
29 | // Protocol definitions\r | |
30 | //\r | |
31 | \r | |
32 | /**\r | |
33 | Provides software reset for the USB host controller.\r | |
34 | \r | |
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 | |
37 | \r | |
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 | |
40 | by the host controller hardware.\r | |
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 | |
43 | \r | |
44 | **/\r | |
45 | typedef\r | |
46 | EFI_STATUS\r | |
47 | (EFIAPI *EFI_USB_HC_PROTOCOL_RESET)(\r | |
48 | IN EFI_USB_HC_PROTOCOL *This,\r | |
49 | IN UINT16 Attributes\r | |
50 | );\r | |
51 | \r | |
52 | /**\r | |
53 | Retrieves current state of the USB host controller.\r | |
54 | \r | |
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 | |
57 | indicates current state of the USB host controller.\r | |
58 | \r | |
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 | |
62 | current state.\r | |
63 | \r | |
64 | **/\r | |
65 | typedef\r | |
66 | EFI_STATUS\r | |
67 | (EFIAPI *EFI_USB_HC_PROTOCOL_GET_STATE)(\r | |
68 | IN EFI_USB_HC_PROTOCOL *This,\r | |
69 | OUT EFI_USB_HC_STATE *State\r | |
70 | );\r | |
71 | \r | |
72 | /**\r | |
73 | Sets the USB host controller to a specific state.\r | |
74 | \r | |
75 | @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r | |
76 | @param State Indicates the state of the host controller that will be set.\r | |
77 | \r | |
78 | @retval EFI_SUCCESS The USB host controller was successfully placed in the state specified by\r | |
79 | State.\r | |
80 | @retval EFI_INVALID_PARAMETER State is NULL.\r | |
81 | @retval EFI_DEVICE_ERROR Failed to set the state specified by State due to device error.\r | |
82 | \r | |
83 | **/\r | |
84 | typedef\r | |
85 | EFI_STATUS\r | |
86 | (EFIAPI *EFI_USB_HC_PROTOCOL_SET_STATE)(\r | |
87 | IN EFI_USB_HC_PROTOCOL *This,\r | |
88 | IN EFI_USB_HC_STATE State\r | |
89 | );\r | |
90 | \r | |
91 | /**\r | |
92 | Submits control transfer to a target USB device.\r | |
93 | \r | |
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 | |
96 | assigned during USB enumeration.\r | |
97 | @param IsSlowDevice Indicates whether the target device is slow device or full-speed\r | |
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 | |
101 | @param Request A pointer to the USB device request that will be sent to the USB\r | |
102 | device.\r | |
103 | @param TransferDirection Specifies the data direction for the transfer. There are three\r | |
104 | values available, EfiUsbDataIn, EfiUsbDataOut and EfiUsbNoData.\r | |
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 | |
107 | @param DataLength On input, indicates the size, in bytes, of the data buffer specified\r | |
108 | by Data. On output, indicates the amount of data actually\r | |
109 | transferred.\r | |
110 | @param TimeOut Indicates the maximum time, in milliseconds, which the transfer\r | |
111 | is allowed to complete.\r | |
112 | @param TransferResult A pointer to the detailed result information generated by this\r | |
113 | control transfer.\r | |
114 | \r | |
115 | @retval EFI_SUCCESS The control transfer was completed successfully.\r | |
116 | @retval EFI_OUT_OF_RESOURCES The control transfer could not be completed due to a lack of resources.\r | |
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 | |
120 | \r | |
121 | **/\r | |
122 | typedef\r | |
123 | EFI_STATUS\r | |
124 | (EFIAPI *EFI_USB_HC_PROTOCOL_CONTROL_TRANSFER)(\r | |
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 | |
137 | /**\r | |
138 | Submits bulk transfer to a bulk endpoint of a USB device.\r | |
139 | \r | |
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 | |
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 | |
153 | @param DataLength On input, indicates the size, in bytes, of the data buffer specified\r | |
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 | |
157 | @param TimeOut Indicates the maximum time, in milliseconds, which the transfer\r | |
158 | is allowed to complete.\r | |
159 | @param TransferResult A pointer to the detailed result information of the bulk transfer.\r | |
160 | \r | |
161 | @retval EFI_SUCCESS The bulk transfer was completed successfully.\r | |
162 | @retval EFI_OUT_OF_RESOURCES The bulk transfer could not be completed due to a lack of resources.\r | |
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 | |
166 | \r | |
167 | **/\r | |
168 | typedef\r | |
169 | EFI_STATUS\r | |
170 | (EFIAPI *EFI_USB_HC_PROTOCOL_BULK_TRANSFER)(\r | |
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 | |
182 | /**\r | |
183 | Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device.\r | |
184 | \r | |
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 | |
187 | assigned during USB enumeration.\r | |
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 | |
192 | caller's responsibility to make sure that the\r | |
193 | EndPointAddress represents an interrupt endpoint.\r | |
194 | @param IsSlowDevice Indicates whether the target device is slow device or full-speed\r | |
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 | |
207 | @param PollingInterval Indicates the interval, in milliseconds, that the asynchronous\r | |
208 | interrupt transfer is polled.\r | |
209 | @param DataLength Indicates the length of data to be received at the rate specified by\r | |
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 | |
214 | @param Context The context that is passed to the CallBackFunction.\r | |
215 | \r | |
216 | @retval EFI_SUCCESS The asynchronous interrupt transfer request has been successfully\r | |
217 | submitted or canceled.\r | |
218 | @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r | |
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 | |
222 | \r | |
223 | **/\r | |
224 | typedef\r | |
225 | EFI_STATUS\r | |
226 | (EFIAPI *EFI_USB_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER)(\r | |
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 | |
240 | /**\r | |
241 | Submits synchronous interrupt transfer to an interrupt endpoint of a USB device.\r | |
242 | \r | |
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 | |
245 | assigned during USB enumeration.\r | |
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 | |
250 | caller's responsibility to make sure that the\r | |
251 | EndPointAddress represents an interrupt endpoint.\r | |
252 | @param IsSlowDevice Indicates whether the target device is slow device or full-speed\r | |
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 | |
256 | @param Data A pointer to the buffer of data that will be transmitted to USB\r | |
257 | device or received from USB device. asynchronous interrupt pipe is canceled.\r | |
258 | @param DataLength On input, the size, in bytes, of the data buffer specified by Data.\r | |
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 | |
266 | @param TransferResult A pointer to the detailed result information from the synchronous\r | |
267 | interrupt transfer.\r | |
268 | \r | |
269 | @retval EFI_SUCCESS The synchronous interrupt transfer was completed successfully.\r | |
270 | @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r | |
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 | |
274 | \r | |
275 | **/\r | |
276 | typedef\r | |
277 | EFI_STATUS\r | |
278 | (EFIAPI *EFI_USB_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER)(\r | |
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 | |
291 | /**\r | |
292 | Submits isochronous transfer to an isochronous endpoint of a USB device.\r | |
293 | \r | |
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 | |
296 | assigned during USB enumeration.\r | |
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 | |
300 | endpoint (whose default endpoint address is 0). It is the caller's\r | |
301 | responsibility to make sure that the EndPointAddress\r | |
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 | |
305 | @param Data A pointer to the buffer of data that will be transmitted to USB\r | |
306 | device or received from USB device. asynchronous interrupt pipe is canceled.\r | |
307 | @param DataLength Specifies the length, in bytes, of the data to be sent to or received\r | |
308 | from the USB device.\r | |
309 | @param TransferResult A pointer to the detailed result information from the isochronous\r | |
310 | transfer.\r | |
311 | \r | |
312 | @retval EFI_SUCCESS The isochronous transfer was completed successfully.\r | |
313 | @retval EFI_OUT_OF_RESOURCES The isochronous could not be completed due to a lack of resources.\r | |
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 | |
317 | \r | |
318 | **/\r | |
319 | typedef\r | |
320 | EFI_STATUS\r | |
321 | (EFIAPI *EFI_USB_HC_PROTOCOL_ISOCHRONOUS_TRANSFER)(\r | |
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 | |
331 | /**\r | |
332 | Submits nonblocking isochronous transfer to an isochronous endpoint of a USB device.\r | |
333 | \r | |
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 | |
336 | assigned during USB enumeration.\r | |
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 | |
341 | caller's responsibility to make sure that the\r | |
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 | |
346 | required for the perframe data payloads. The pipe may, on an ongoing basis,\r | |
347 | actually use less bandwidth than that reserved.\r | |
348 | @param Data A pointer to the buffer of data that will be transmitted to USB\r | |
349 | device or received from USB device. asynchronous interrupt pipe is canceled.\r | |
350 | @param DataLength Specifies the length, in bytes, of the data to be sent to or received\r | |
351 | from the USB device.\r | |
352 | @param IsochronousCallback The Callback function.This function is called if the requested\r | |
353 | isochronous transfer is completed.\r | |
354 | @param Context Data passed to the IsochronousCallback function. This is\r | |
355 | an optional parameter and may be NULL.\r | |
356 | \r | |
357 | @retval EFI_SUCCESS The asynchronous isochronous transfer was completed successfully.\r | |
358 | @retval EFI_OUT_OF_RESOURCES The asynchronous isochronous could not be completed due to a lack of resources.\r | |
359 | @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r | |
360 | \r | |
361 | **/\r | |
362 | typedef\r | |
363 | EFI_STATUS\r | |
364 | (EFIAPI *EFI_USB_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER)(\r | |
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 | |
375 | /**\r | |
376 | Retrieves the number of root hub ports.\r | |
377 | \r | |
378 | @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r | |
379 | @param PortNumber A pointer to the number of the root hub ports.\r | |
380 | \r | |
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 | |
384 | \r | |
385 | **/\r | |
386 | typedef\r | |
387 | EFI_STATUS\r | |
388 | (EFIAPI *EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_NUMBER)(\r | |
389 | IN EFI_USB_HC_PROTOCOL *This,\r | |
390 | OUT UINT8 *PortNumber\r | |
391 | );\r | |
392 | \r | |
393 | /**\r | |
394 | Retrieves the current status of a USB root hub port.\r | |
395 | \r | |
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 | |
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 | |
401 | @param PortStatus A pointer to the current port status bits and port status change bits.\r | |
402 | \r | |
403 | @retval EFI_SUCCESS The status of the USB root hub port specified by PortNumber\r | |
404 | was returned in PortStatus.\r | |
405 | @retval EFI_INVALID_PARAMETER PortNumber is invalid.\r | |
406 | \r | |
407 | **/\r | |
408 | typedef\r | |
409 | EFI_STATUS\r | |
410 | (EFIAPI *EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS)(\r | |
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 | |
416 | /**\r | |
417 | Sets a feature for the specified root hub port.\r | |
418 | \r | |
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 | |
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 | |
424 | @param PortFeature Indicates the feature selector associated with the feature set\r | |
425 | request.\r | |
426 | \r | |
427 | @retval EFI_SUCCESS The feature specified by PortFeature was set for the USB\r | |
428 | root hub port specified by PortNumber.\r | |
429 | @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid for this function.\r | |
430 | \r | |
431 | **/\r | |
432 | typedef\r | |
433 | EFI_STATUS\r | |
434 | (EFIAPI *EFI_USB_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE)(\r | |
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 | |
440 | /**\r | |
441 | Clears a feature for the specified root hub port.\r | |
442 | \r | |
443 | @param This A pointer to the EFI_USB_HC_PROTOCOL instance.\r | |
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 | |
448 | @param PortFeature Indicates the feature selector associated with the feature clear\r | |
449 | request.\r | |
450 | \r | |
451 | @retval EFI_SUCCESS The feature specified by PortFeature was cleared for the USB\r | |
452 | root hub port specified by PortNumber.\r | |
453 | @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid for this function.\r | |
454 | \r | |
455 | **/\r | |
456 | typedef\r | |
457 | EFI_STATUS\r | |
458 | (EFIAPI *EFI_USB_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE)(\r | |
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 | |
464 | \r | |
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 | |
470 | /// EFI_DEVICE_PATH_PROTOCOL instance, and an EFI_USB_HC_PROTOCOL instance.\r | |
471 | ///\r | |
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 | |
486 | ///\r | |
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 | |
489 | /// host controller is compliant.\r | |
490 | ///\r | |
491 | UINT16 MajorRevision;\r | |
492 | ///\r | |
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 | |
497 | UINT16 MinorRevision;\r | |
498 | };\r | |
499 | \r | |
500 | extern EFI_GUID gEfiUsbHcProtocolGuid;\r | |
501 | \r | |
502 | #endif\r |