2 Common Dxe Libarary for USB
4 Copyright (c) 2006, Intel Corporation<BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef __USB_DXE_LIB_H__
17 #define __USB_DXE_LIB_H__
19 #include <Protocol/UsbIo.h>
22 // define the timeout time as 3ms
24 #define TIMEOUT_VALUE 3 * 1000
29 IN EFI_USB_IO_PROTOCOL
*UsbIo
,
30 IN UINT8 InterfaceNum
,
31 OUT EFI_USB_HID_DESCRIPTOR
*HidDescriptor
36 UsbGetReportDescriptor (
37 IN EFI_USB_IO_PROTOCOL
*UsbIo
,
38 IN UINT8 InterfaceNum
,
39 IN UINT16 DescriptorSize
,
40 OUT UINT8
*DescriptorBuffer
45 UsbGetProtocolRequest (
46 IN EFI_USB_IO_PROTOCOL
*UsbIo
,
53 UsbSetProtocolRequest (
54 IN EFI_USB_IO_PROTOCOL
*UsbIo
,
62 IN EFI_USB_IO_PROTOCOL
*UsbIo
,
71 IN EFI_USB_IO_PROTOCOL
*UsbIo
,
80 IN EFI_USB_IO_PROTOCOL
*UsbIo
,
91 IN EFI_USB_IO_PROTOCOL
*UsbIo
,
101 IN EFI_USB_IO_PROTOCOL
*UsbIo
,
104 IN UINT16 DescriptorLength
,
105 OUT VOID
*Descriptor
,
112 IN EFI_USB_IO_PROTOCOL
*UsbIo
,
115 IN UINT16 DescriptorLength
,
123 IN EFI_USB_IO_PROTOCOL
*UsbIo
,
125 OUT UINT8
*AltSetting
,
132 IN EFI_USB_IO_PROTOCOL
*UsbIo
,
133 IN UINT16 InterfaceNo
,
134 IN UINT16 AltSetting
,
140 UsbGetConfiguration (
141 IN EFI_USB_IO_PROTOCOL
*UsbIo
,
142 OUT UINT8
*ConfigValue
,
148 UsbSetConfiguration (
149 IN EFI_USB_IO_PROTOCOL
*UsbIo
,
157 IN EFI_USB_IO_PROTOCOL
*UsbIo
,
167 IN EFI_USB_IO_PROTOCOL
*UsbIo
,
177 IN EFI_USB_IO_PROTOCOL
*UsbIo
,
180 OUT UINT16
*DevStatus
,
185 // Clear endpoint stall
189 UsbClearEndpointHalt (
190 IN EFI_USB_IO_PROTOCOL
*UsbIo
,