]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Library/UefiUsbLib.h
Second set of changes based on a review of the code comments in the Include directory...
[mirror_edk2.git] / MdePkg / Include / Library / UefiUsbLib.h
CommitLineData
842f5579 1/** @file\r
1a2f870c 2 Provides most USB APIs to support the Hid requests defined in USB Hid 1.1 spec\r
3 and the standard requests defined in USB 1.1 spec.\r
fb3df220 4\r
50a64e5b 5Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
6All rights reserved. This program and the accompanying materials\r
7are licensed and made available under the terms and conditions of the BSD License\r
8which accompanies this distribution. The full text of the license may be found at\r
9http://opensource.org/licenses/bsd-license.php\r
842f5579 10\r
50a64e5b 11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
842f5579
A
13\r
14**/\r
fb3df220 15\r
fb3df220 16\r
842f5579
A
17#ifndef __USB_DXE_LIB_H__\r
18#define __USB_DXE_LIB_H__\r
fb3df220 19\r
c7d265a9 20#include <Protocol/UsbIo.h>\r
1a2f870c 21#include <IndustryStandard/Usb.h>\r
ed838d0c 22\r
373b5cf9 23/**\r
d5954c61 24 Get the descriptor of the specified USB HID interface.\r
373b5cf9 25\r
1a2f870c 26 Submit a UsbGetHidDescriptor() request for the USB device specified by UsbIo\r
27 and Interface, and return the HID descriptor in HidDescriptor.\r
d5954c61 28 If UsbIo is NULL, then ASSERT().\r
29 If HidDescriptor is NULL, then ASSERT().\r
373b5cf9 30\r
d5954c61 31 @param UsbIo A pointer to the USB I/O Protocol instance for the specific USB target.\r
32 @param Interface The index of the HID interface on the USB target.\r
33 @param HidDescriptor Pointer to the USB HID descriptor that was retrieved from\r
34 the specified USB target and interface. Type EFI_USB_HID_DESCRIPTOR\r
35 is defined in the MDE Package Industry Standard include file Usb.h.\r
36\r
37 @retval EFI_SUCCESS The request executed successfully.\r
38 @retval EFI_TIMEOUT A timeout occurred executing the request.\r
39 @retval EFI_DEVICE_ERROR The request failed due to a device error.\r
373b5cf9 40\r
41**/\r
fb3df220 42EFI_STATUS\r
f1787349 43EFIAPI\r
fb3df220 44UsbGetHidDescriptor (\r
45 IN EFI_USB_IO_PROTOCOL *UsbIo,\r
d5954c61 46 IN UINT8 Interface,\r
fb3df220 47 OUT EFI_USB_HID_DESCRIPTOR *HidDescriptor\r
48 );\r
49\r
373b5cf9 50\r
51/**\r
d5954c61 52 Get the report descriptor of the specified USB HID interface.\r
53\r
54 Submit a USB get HID report descriptor request for the USB device specified by\r
1a2f870c 55 UsbIo and Interface, and return the report descriptor in DescriptorBuffer.\r
d5954c61 56 If UsbIo is NULL, then ASSERT().\r
57 If DescriptorBuffer is NULL, then ASSERT().\r
373b5cf9 58\r
d5954c61 59 @param UsbIo A pointer to the USB I/O Protocol instance for the specific USB target.\r
60 @param Interface The index of the report interface on the USB target.\r
61 @param DescriptorLength The size, in bytes, of DescriptorBuffer.\r
62 @param DescriptorBuffer A pointer to the buffer to store the report class descriptor.\r
373b5cf9 63\r
d5954c61 64 @retval EFI_SUCCESS The request executed successfully.\r
65 @retval EFI_OUT_OF_RESOURCES The request could not be completed because the\r
9638ba6d 66 buffer specified by DescriptorLength and DescriptorBuffer\r
d5954c61 67 is not large enough to hold the result of the request.\r
68 @retval EFI_TIMEOUT A timeout occurred executing the request.\r
69 @retval EFI_DEVICE_ERROR The request failed due to a device error.\r
373b5cf9 70\r
71**/\r
fb3df220 72EFI_STATUS\r
f1787349 73EFIAPI\r
fb3df220 74UsbGetReportDescriptor (\r
75 IN EFI_USB_IO_PROTOCOL *UsbIo,\r
d5954c61 76 IN UINT8 Interface,\r
77 IN UINT16 DescriptorLength,\r
fb3df220 78 OUT UINT8 *DescriptorBuffer\r
79 );\r
80\r
373b5cf9 81/**\r
d5954c61 82 Get the HID protocol of the specified USB HID interface.\r
373b5cf9 83\r
d5954c61 84 Submit a USB get HID protocol request for the USB device specified by UsbIo\r
1a2f870c 85 and Interface, and return the protocol retrieved in Protocol.\r
d5954c61 86 If UsbIo is NULL, then ASSERT().\r
87 If Protocol is NULL, then ASSERT().\r
373b5cf9 88\r
d5954c61 89 @param UsbIo A pointer to the USB I/O Protocol instance for the specific USB target.\r
90 @param Interface The index of the report interface on the USB target.\r
91 @param Protocol A pointer to the protocol for the specified USB target.\r
92\r
93 @retval EFI_SUCCESS The request executed successfully.\r
94 @retval EFI_TIMEOUT A timeout occurred executing the request.\r
95 @retval EFI_DEVICE_ERROR The request failed due to a device error.\r
373b5cf9 96\r
97**/\r
fb3df220 98EFI_STATUS\r
f1787349 99EFIAPI\r
fb3df220 100UsbGetProtocolRequest (\r
101 IN EFI_USB_IO_PROTOCOL *UsbIo,\r
102 IN UINT8 Interface,\r
4cb616da 103 OUT UINT8 *Protocol\r
fb3df220 104 );\r
105\r
373b5cf9 106/**\r
d5954c61 107 Set the HID protocol of the specified USB HID interface.\r
108\r
109 Submit a USB set HID protocol request for the USB device specified by UsbIo\r
1a2f870c 110 and Interface, and set the protocol to the value specified by Protocol.\r
d5954c61 111 If UsbIo is NULL, then ASSERT().\r
373b5cf9 112\r
d5954c61 113 @param UsbIo A pointer to the USB I/O Protocol instance for the specific USB target.\r
114 @param Interface The index of the report interface on the USB target.\r
115 @param Protocol The protocol value to set for the specified USB target.\r
373b5cf9 116\r
d5954c61 117 @retval EFI_SUCCESS The request executed successfully.\r
118 @retval EFI_TIMEOUT A timeout occurred executing the request.\r
119 @retval EFI_DEVICE_ERROR The request failed due to a device error.\r
373b5cf9 120\r
121**/\r
fb3df220 122EFI_STATUS\r
f1787349 123EFIAPI\r
fb3df220 124UsbSetProtocolRequest (\r
125 IN EFI_USB_IO_PROTOCOL *UsbIo,\r
126 IN UINT8 Interface,\r
127 IN UINT8 Protocol\r
128 );\r
129\r
373b5cf9 130/**\r
d5954c61 131 Set the idle rate of the specified USB HID report.\r
132\r
133 Submit a USB set HID report idle request for the USB device specified by UsbIo,\r
134 Interface, and ReportId, and set the idle rate to the value specified by Duration.\r
135 If UsbIo is NULL, then ASSERT().\r
373b5cf9 136\r
d5954c61 137 @param UsbIo A pointer to the USB I/O Protocol instance for the specific USB target.\r
138 @param Interface The index of the report interface on the USB target.\r
139 @param ReportId The identifier of the report to retrieve.\r
140 @param Duration The idle rate to set for the specified USB target.\r
373b5cf9 141\r
d5954c61 142 @retval EFI_SUCCESS The request executed successfully.\r
143 @retval EFI_TIMEOUT A timeout occurred executing the request.\r
144 @retval EFI_DEVICE_ERROR The request failed due to a device error.\r
373b5cf9 145\r
146**/\r
fb3df220 147EFI_STATUS\r
f1787349 148EFIAPI\r
fb3df220 149UsbSetIdleRequest (\r
150 IN EFI_USB_IO_PROTOCOL *UsbIo,\r
151 IN UINT8 Interface,\r
152 IN UINT8 ReportId,\r
153 IN UINT8 Duration\r
154 );\r
155\r
373b5cf9 156/**\r
d5954c61 157 Get the idle rate of the specified USB HID report.\r
373b5cf9 158\r
d5954c61 159 Submit a USB get HID report idle request for the USB device specified by UsbIo,\r
160 Interface, and ReportId, and return the ide rate in Duration.\r
161 If UsbIo is NULL, then ASSERT().\r
162 If Duration is NULL, then ASSERT().\r
373b5cf9 163\r
d5954c61 164 @param UsbIo A pointer to the USB I/O Protocol instance for the specific USB target.\r
165 @param Interface The index of the report interface on the USB target.\r
166 @param ReportId The identifier of the report to retrieve.\r
167 @param Duration A pointer to the idle rate retrieved from the specified USB target.\r
168\r
169 @retval EFI_SUCCESS The request executed successfully.\r
170 @retval EFI_TIMEOUT A timeout occurred executing the request.\r
171 @retval EFI_DEVICE_ERROR The request failed due to a device error.\r
373b5cf9 172\r
173**/\r
fb3df220 174EFI_STATUS\r
f1787349 175EFIAPI\r
fb3df220 176UsbGetIdleRequest (\r
177 IN EFI_USB_IO_PROTOCOL *UsbIo,\r
178 IN UINT8 Interface,\r
179 IN UINT8 ReportId,\r
180 OUT UINT8 *Duration\r
181 );\r
182\r
373b5cf9 183/**\r
d5954c61 184 Set the report descriptor of the specified USB HID interface.\r
373b5cf9 185\r
98ea597b 186 Submit a USB set HID report request for the USB device specified by UsbIo,\r
187 Interface, ReportId, and ReportType, and set the report descriptor using the\r
188 buffer specified by ReportLength and Report.\r
189 If UsbIo is NULL, then ASSERT().\r
190 If Report is NULL, then ASSERT().\r
191\r
d5954c61 192 @param UsbIo A pointer to the USB I/O Protocol instance for the specific USB target.\r
193 @param Interface The index of the report interface on the USB target.\r
194 @param ReportId The identifier of the report to retrieve.\r
195 @param ReportType The type of report to retrieve.\r
196 @param ReportLength The size, in bytes, of Report.\r
197 @param Report A pointer to the report descriptor buffer to set.\r
373b5cf9 198\r
d5954c61 199 @retval EFI_SUCCESS The request executed successfully.\r
200 @retval EFI_TIMEOUT A timeout occurred executing the request.\r
201 @retval EFI_DEVICE_ERROR The request failed due to a device error.\r
373b5cf9 202\r
203**/\r
fb3df220 204EFI_STATUS\r
f1787349 205EFIAPI\r
fb3df220 206UsbSetReportRequest (\r
207 IN EFI_USB_IO_PROTOCOL *UsbIo,\r
208 IN UINT8 Interface,\r
209 IN UINT8 ReportId,\r
210 IN UINT8 ReportType,\r
211 IN UINT16 ReportLen,\r
212 IN UINT8 *Report\r
213 );\r
214\r
373b5cf9 215/**\r
d5954c61 216 Get the report descriptor of the specified USB HID interface.\r
217\r
218 Submit a USB get HID report request for the USB device specified by UsbIo,\r
219 Interface, ReportId, and ReportType, and return the report in the buffer\r
220 specified by Report.\r
221 If UsbIo is NULL, then ASSERT().\r
222 If Report is NULL, then ASSERT().\r
223\r
224 @param UsbIo A pointer to the USB I/O Protocol instance for the specific USB target.\r
225 @param Interface The index of the report interface on the USB target.\r
226 @param ReportId The identifier of the report to retrieve.\r
227 @param ReportType The type of report to retrieve.\r
228 @param ReportLength The size, in bytes, of Report.\r
229 @param Report A pointer to the buffer to store the report descriptor.\r
230\r
231 @retval EFI_SUCCESS The request executed successfully.\r
232 @retval EFI_OUT_OF_RESOURCES The request could not be completed because the\r
28d3e14f 233 buffer specified by ReportLength and Report is not\r
d5954c61 234 large enough to hold the result of the request.\r
235 @retval EFI_TIMEOUT A timeout occurred executing the request.\r
236 @retval EFI_DEVICE_ERROR The request failed due to a device error.\r
373b5cf9 237\r
238**/\r
fb3df220 239EFI_STATUS\r
f1787349 240EFIAPI\r
fb3df220 241UsbGetReportRequest (\r
4cb616da 242 IN EFI_USB_IO_PROTOCOL *UsbIo,\r
243 IN UINT8 Interface,\r
244 IN UINT8 ReportId,\r
245 IN UINT8 ReportType,\r
246 IN UINT16 ReportLen,\r
247 OUT UINT8 *Report\r
fb3df220 248 );\r
249\r
373b5cf9 250/**\r
d5954c61 251 Get the descriptor of the specified USB device.\r
252\r
253 Submit a USB get descriptor request for the USB device specified by UsbIo, Value,\r
254 and Index, and return the descriptor in the buffer specified by Descriptor.\r
255 The status of the transfer is returned in Status.\r
256 If UsbIo is NULL, then ASSERT().\r
257 If Descriptor is NULL, then ASSERT().\r
258 If Status is NULL, then ASSERT().\r
259\r
260 @param UsbIo A pointer to the USB I/O Protocol instance for the specific USB target.\r
261 @param Value The device request value.\r
262 @param Index The device request index.\r
263 @param DescriptorLength The size, in bytes, of Descriptor.\r
264 @param Descriptor A pointer to the descriptor buffer to get.\r
265 @param Status A pointer to the status of the transfer.\r
266\r
267 @retval EFI_SUCCESS The request executed successfully.\r
268 @retval EFI_OUT_OF_RESOURCES The request could not be completed because the\r
28d3e14f 269 buffer specified by DescriptorLength and Descriptor\r
d5954c61 270 is not large enough to hold the result of the request.\r
271 @retval EFI_TIMEOUT A timeout occurred executing the request.\r
272 @retval EFI_DEVICE_ERROR The request failed due to a device error. The transfer\r
273 status is returned in Status.\r
373b5cf9 274\r
275**/\r
fb3df220 276EFI_STATUS\r
9199040c 277EFIAPI\r
fb3df220 278UsbGetDescriptor (\r
279 IN EFI_USB_IO_PROTOCOL *UsbIo,\r
280 IN UINT16 Value,\r
281 IN UINT16 Index,\r
282 IN UINT16 DescriptorLength,\r
283 OUT VOID *Descriptor,\r
284 OUT UINT32 *Status\r
285 );\r
286\r
373b5cf9 287/**\r
d5954c61 288 Set the descriptor of the specified USB device.\r
289\r
290 Submit a USB set descriptor request for the USB device specified by UsbIo,\r
291 Value, and Index, and set the descriptor using the buffer specified by DesriptorLength\r
292 and Descriptor. The status of the transfer is returned in Status.\r
293 If UsbIo is NULL, then ASSERT().\r
294 If Descriptor is NULL, then ASSERT().\r
295 If Status is NULL, then ASSERT().\r
296\r
297 @param UsbIo A pointer to the USB I/O Protocol instance for the specific USB target.\r
298 @param Value The device request value.\r
299 @param Index The device request index.\r
300 @param DescriptorLength The size, in bytes, of Descriptor.\r
301 @param Descriptor A pointer to the descriptor buffer to set.\r
302 @param Status A pointer to the status of the transfer.\r
303\r
304 @retval EFI_SUCCESS The request executed successfully.\r
305 @retval EFI_TIMEOUT A timeout occurred executing the request.\r
306 @retval EFI_DEVICE_ERROR The request failed due to a device error.\r
307 The transfer status is returned in Status.\r
373b5cf9 308\r
309**/\r
fb3df220 310EFI_STATUS\r
f1787349 311EFIAPI\r
fb3df220 312UsbSetDescriptor (\r
313 IN EFI_USB_IO_PROTOCOL *UsbIo,\r
314 IN UINT16 Value,\r
315 IN UINT16 Index,\r
316 IN UINT16 DescriptorLength,\r
317 IN VOID *Descriptor,\r
318 OUT UINT32 *Status\r
319 );\r
320\r
373b5cf9 321/**\r
d5954c61 322 Get the interface setting of the specified USB device.\r
373b5cf9 323\r
d5954c61 324 Submit a USB get interface request for the USB device specified by UsbIo,\r
325 and Interface, and place the result in the buffer specified by AlternateSetting.\r
326 The status of the transfer is returned in Status.\r
327 If UsbIo is NULL, then ASSERT().\r
328 If AlternateSetting is NULL, then ASSERT().\r
329 If Status is NULL, then ASSERT().\r
373b5cf9 330\r
d5954c61 331 @param UsbIo A pointer to the USB I/O Protocol instance for the specific USB target.\r
332 @param Interface The interface index value.\r
333 @param AlternateSetting A pointer to the alternate setting to be retrieved.\r
334 @param Status A pointer to the status of the transfer.\r
335\r
336 @retval EFI_SUCCESS The request executed successfully.\r
337 @retval EFI_TIMEOUT A timeout occurred executing the request.\r
338 @retval EFI_DEVICE_ERROR The request failed due to a device error.\r
339 The transfer status is returned in Status.\r
373b5cf9 340\r
341**/\r
fb3df220 342EFI_STATUS\r
f1787349 343EFIAPI\r
ed838d0c 344UsbGetInterface (\r
fb3df220 345 IN EFI_USB_IO_PROTOCOL *UsbIo,\r
d5954c61 346 IN UINT16 Interface,\r
2d8a3c13 347 OUT UINT16 *AlternateSetting,\r
fb3df220 348 OUT UINT32 *Status\r
349 );\r
350\r
373b5cf9 351/**\r
d5954c61 352 Set the interface setting of the specified USB device.\r
373b5cf9 353\r
d5954c61 354 Submit a USB set interface request for the USB device specified by UsbIo, and\r
355 Interface, and set the alternate setting to the value specified by AlternateSetting.\r
356 The status of the transfer is returned in Status.\r
357 If UsbIo is NULL, then ASSERT().\r
358 If Status is NULL, then ASSERT().\r
373b5cf9 359\r
d5954c61 360 @param UsbIo A pointer to the USB I/O Protocol instance for the specific USB target.\r
361 @param Interface The interface index value.\r
362 @param AlternateSetting The alternate setting to be set.\r
363 @param Status A pointer to the status of the transfer.\r
364\r
365 @retval EFI_SUCCESS The request executed successfully.\r
366 @retval EFI_TIMEOUT A timeout occurred executing the request.\r
367 @retval EFI_SUCCESS The request failed due to a device error.\r
368 The transfer status is returned in Status.\r
373b5cf9 369\r
370**/\r
fb3df220 371EFI_STATUS\r
f1787349 372EFIAPI\r
ed838d0c 373UsbSetInterface (\r
fb3df220 374 IN EFI_USB_IO_PROTOCOL *UsbIo,\r
d5954c61 375 IN UINT16 Interface,\r
376 IN UINT16 AlternateSetting,\r
fb3df220 377 OUT UINT32 *Status\r
378 );\r
379\r
373b5cf9 380/**\r
d5954c61 381 Get the device configuration.\r
382\r
383 Submit a USB get configuration request for the USB device specified by UsbIo\r
384 and place the result in the buffer specified by ConfigurationValue. The status\r
385 of the transfer is returned in Status.\r
386 If UsbIo is NULL, then ASSERT().\r
387 If ConfigurationValue is NULL, then ASSERT().\r
388 If Status is NULL, then ASSERT().\r
373b5cf9 389\r
d5954c61 390 @param UsbIo A pointer to the USB I/O Protocol instance for the specific USB target.\r
391 @param ConfigurationValue A pointer to the device configuration to be retrieved.\r
392 @param Status A pointer to the status of the transfer.\r
373b5cf9 393\r
d5954c61 394 @retval EFI_SUCCESS The request executed successfully.\r
395 @retval EFI_TIMEOUT A timeout occurred executing the request.\r
396 @retval EFI_DEVICE_ERROR The request failed due to a device error.\r
397 The transfer status is returned in Status.\r
373b5cf9 398\r
399**/\r
fb3df220 400EFI_STATUS\r
f1787349 401EFIAPI\r
ed838d0c 402UsbGetConfiguration (\r
fb3df220 403 IN EFI_USB_IO_PROTOCOL *UsbIo,\r
2d8a3c13 404 OUT UINT16 *ConfigurationValue,\r
fb3df220 405 OUT UINT32 *Status\r
406 );\r
407\r
373b5cf9 408/**\r
d5954c61 409 Set the device configuration.\r
373b5cf9 410\r
d5954c61 411 Submit a USB set configuration request for the USB device specified by UsbIo\r
412 and set the device configuration to the value specified by ConfigurationValue.\r
413 The status of the transfer is returned in Status.\r
414 If UsbIo is NULL, then ASSERT().\r
415 If Status is NULL, then ASSERT().\r
373b5cf9 416\r
d5954c61 417 @param UsbIo A pointer to the USB I/O Protocol instance for the specific USB target.\r
418 @param ConfigurationValue The device configuration value to be set.\r
419 @param Status A pointer to the status of the transfer.\r
420\r
421 @retval EFI_SUCCESS The request executed successfully.\r
422 @retval EFI_TIMEOUT A timeout occurred executing the request.\r
423 @retval EFI_DEVICE_ERROR The request failed due to a device error.\r
424 The transfer status is returned in Status.\r
373b5cf9 425\r
426**/\r
fb3df220 427EFI_STATUS\r
f1787349 428EFIAPI\r
ed838d0c 429UsbSetConfiguration (\r
fb3df220 430 IN EFI_USB_IO_PROTOCOL *UsbIo,\r
d5954c61 431 IN UINT16 ConfigurationValue,\r
fb3df220 432 OUT UINT32 *Status\r
433 );\r
434\r
373b5cf9 435/**\r
d5954c61 436 Set the specified feature of the specified device.\r
437\r
438 Submit a USB set device feature request for the USB device specified by UsbIo,\r
439 Recipient, and Target to the value specified by Value. The status of the\r
440 transfer is returned in Status.\r
441 If UsbIo is NULL, then ASSERT().\r
442 If Status is NULL, then ASSERT().\r
443\r
444 @param UsbIo A pointer to the USB I/O Protocol instance for the specific USB target.\r
445 @param Recipient The USB data recipient type (i.e. Device, Interface, Endpoint).\r
446 Type USB_TYPES_DEFINITION is defined in the MDE Package Industry\r
447 Standard include file Usb.h.\r
448 @param Value The value of the feature to be set.\r
449 @param Target The index of the device to be set.\r
450 @param Status A pointer to the status of the transfer.\r
451\r
452 @retval EFI_SUCCESS The request executed successfully.\r
453 @retval EFI_TIMEOUT A timeout occurred executing the request.\r
454 @retval EFI_DEVICE_ERROR The request failed due to a device error.\r
455 The transfer status is returned in Status.\r
373b5cf9 456\r
457**/\r
fb3df220 458EFI_STATUS\r
f1787349 459EFIAPI\r
ed838d0c 460UsbSetFeature (\r
fb3df220 461 IN EFI_USB_IO_PROTOCOL *UsbIo,\r
d5954c61 462 IN USB_TYPES_DEFINITION Recipient,\r
fb3df220 463 IN UINT16 Value,\r
464 IN UINT16 Target,\r
465 OUT UINT32 *Status\r
466 );\r
467\r
373b5cf9 468/**\r
d5954c61 469 Clear the specified feature of the specified device.\r
470\r
471 Submit a USB clear device feature request for the USB device specified by UsbIo,\r
472 Recipient, and Target to the value specified by Value. The status of the transfer\r
473 is returned in Status.\r
474 If UsbIo is NULL, then ASSERT().\r
475 If Status is NULL, then ASSERT().\r
476\r
477 @param UsbIo A pointer to the USB I/O Protocol instance for the specific USB target.\r
478 @param Recipient The USB data recipient type (i.e. Device, Interface, Endpoint).\r
479 Type USB_TYPES_DEFINITION is defined in the MDE Package Industry Standard\r
480 include file Usb.h.\r
481 @param Value The value of the feature to be cleared.\r
482 @param Target The index of the device to be cleared.\r
483 @param Status A pointer to the status of the transfer.\r
484\r
485 @retval EFI_SUCCESS The request executed successfully.\r
486 @retval EFI_TIMEOUT A timeout occurred executing the request.\r
487 @retval EFI_DEVICE_ERROR The request failed due to a device error.\r
488 The transfer status is returned in Status.\r
373b5cf9 489\r
490**/\r
fb3df220 491EFI_STATUS\r
f1787349 492EFIAPI\r
ed838d0c 493UsbClearFeature (\r
fb3df220 494 IN EFI_USB_IO_PROTOCOL *UsbIo,\r
d5954c61 495 IN USB_TYPES_DEFINITION Recipient,\r
fb3df220 496 IN UINT16 Value,\r
497 IN UINT16 Target,\r
498 OUT UINT32 *Status\r
499 );\r
500\r
373b5cf9 501/**\r
d5954c61 502 Get the status of the specified device.\r
503\r
504 Submit a USB device get status request for the USB device specified by UsbIo,\r
1a2f870c 505 Recipient, and Target, and place the result in the buffer specified by DeviceStatus.\r
d5954c61 506 The status of the transfer is returned in Status.\r
507 If UsbIo is NULL, then ASSERT().\r
508 If DeviceStatus is NULL, then ASSERT().\r
509 If Status is NULL, then ASSERT().\r
510\r
511 @param UsbIo A pointer to the USB I/O Protocol instance for the specific USB target.\r
512 @param Recipient The USB data recipient type (i.e. Device, Interface, Endpoint).\r
513 Type USB_TYPES_DEFINITION is defined in the MDE Package Industry Standard\r
514 include file Usb.h.\r
515 @param Target The index of the device to be get the status of.\r
516 @param DeviceStatus A pointer to the device status to be retrieved.\r
517 @param Status A pointer to the status of the transfer.\r
518\r
519 @retval EFI_SUCCESS The request executed successfully.\r
520 @retval EFI_TIMEOUT A timeout occurred executing the request.\r
521 @retval EFI_DEVICE_ERROR The request failed due to a device error.\r
522 The transfer status is returned in Status.\r
373b5cf9 523\r
524**/\r
fb3df220 525EFI_STATUS\r
f1787349 526EFIAPI\r
ed838d0c 527UsbGetStatus (\r
fb3df220 528 IN EFI_USB_IO_PROTOCOL *UsbIo,\r
d5954c61 529 IN USB_TYPES_DEFINITION Recipient,\r
fb3df220 530 IN UINT16 Target,\r
adde977a 531 OUT UINT16 *DeviceStatus,\r
fb3df220 532 OUT UINT32 *Status\r
533 );\r
534\r
373b5cf9 535/**\r
d5954c61 536 Clear halt feature of the specified usb endpoint.\r
537\r
538 Retrieve the USB endpoint descriptor specified by UsbIo and EndPoint.\r
539 If the USB endpoint descriptor can not be retrieved, then return EFI_NOT_FOUND.\r
9638ba6d 540 If the endpoint descriptor is found, then clear the halt feature of this USB endpoint.\r
d5954c61 541 The status of the transfer is returned in Status.\r
542 If UsbIo is NULL, then ASSERT().\r
543 If Status is NULL, then ASSERT().\r
373b5cf9 544\r
d5954c61 545 @param UsbIo A pointer to the USB I/O Protocol instance for the specific USB target.\r
546 @param Endpoint The endpoint address.\r
547 @param Status A pointer to the status of the transfer.\r
373b5cf9 548\r
d5954c61 549 @retval EFI_SUCCESS The request executed successfully.\r
550 @retval EFI_TIMEOUT A timeout occurred executing the request.\r
551 @retval EFI_DEVICE_ERROR The request failed due to a device error.\r
552 The transfer status is returned in Status.\r
553 @retval EFI_NOT_FOUND The specified USB endpoint descriptor can not be found\r
373b5cf9 554\r
555**/\r
fb3df220 556EFI_STATUS\r
f1787349 557EFIAPI\r
fb3df220 558UsbClearEndpointHalt (\r
559 IN EFI_USB_IO_PROTOCOL *UsbIo,\r
d5954c61 560 IN UINT8 Endpoint,\r
fb3df220 561 OUT UINT32 *Status\r
562 );\r
563\r
564#endif\r