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