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