X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FLibrary%2FUefiUsbLib.h;h=6f625a04482ad56a88aeb1d0d551ce6892e7f968;hp=0594ceac52beafe1638d000c9a646eb7aaace7ad;hb=d8af3301a648df3b4eea6933a46f56f1853367d6;hpb=2d8a3c1354e24b4da5c68f2daaf3d4eff7f6180c diff --git a/MdePkg/Include/Library/UefiUsbLib.h b/MdePkg/Include/Library/UefiUsbLib.h index 0594ceac52..6f625a0448 100644 --- a/MdePkg/Include/Library/UefiUsbLib.h +++ b/MdePkg/Include/Library/UefiUsbLib.h @@ -1,9 +1,9 @@ /** @file - Provides most usb APIs to support the Hid requests defined in Usb Hid 1.1 spec - and the standard requests defined in Usb 1.1 spec. + Provides most USB APIs to support the Hid requests defined in USB Hid 1.1 spec + and the standard requests defined in USB 1.1 spec. -Copyright (c) 2006 - 2008, Intel Corporation
-All rights reserved. This program and the accompanying materials +Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -18,18 +18,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define __USB_DXE_LIB_H__ #include -#include - -/// -/// define the timeout time as 3ms -/// -#define TIMEOUT_VALUE 3 * 1000 /** Get the descriptor of the specified USB HID interface. - Submit a USB get HID descriptor request for the USB device specified by UsbIo - and Interface and return the HID descriptor in HidDescriptor. + Submit a UsbGetHidDescriptor() request for the USB device specified by UsbIo + and Interface, and return the HID descriptor in HidDescriptor. If UsbIo is NULL, then ASSERT(). If HidDescriptor is NULL, then ASSERT(). @@ -57,7 +51,7 @@ UsbGetHidDescriptor ( Get the report descriptor of the specified USB HID interface. Submit a USB get HID report descriptor request for the USB device specified by - UsbIo and Interface and return the report descriptor in DescriptorBuffer. + UsbIo and Interface, and return the report descriptor in DescriptorBuffer. If UsbIo is NULL, then ASSERT(). If DescriptorBuffer is NULL, then ASSERT(). @@ -87,7 +81,7 @@ UsbGetReportDescriptor ( Get the HID protocol of the specified USB HID interface. Submit a USB get HID protocol request for the USB device specified by UsbIo - and Interface and return the protocol retrieved in Protocol. + and Interface, and return the protocol retrieved in Protocol. If UsbIo is NULL, then ASSERT(). If Protocol is NULL, then ASSERT(). @@ -105,14 +99,14 @@ EFIAPI UsbGetProtocolRequest ( IN EFI_USB_IO_PROTOCOL *UsbIo, IN UINT8 Interface, - IN UINT8 *Protocol + OUT UINT8 *Protocol ); /** Set the HID protocol of the specified USB HID interface. Submit a USB set HID protocol request for the USB device specified by UsbIo - and Interface and set the protocol to the value specified by Protocol. + and Interface, and set the protocol to the value specified by Protocol. If UsbIo is NULL, then ASSERT(). @param UsbIo A pointer to the USB I/O Protocol instance for the specific USB target. @@ -235,7 +229,7 @@ UsbSetReportRequest ( @retval EFI_SUCCESS The request executed successfully. @retval EFI_OUT_OF_RESOURCES The request could not be completed because the - buffer specifed by ReportLength and Report is not + buffer specified by ReportLength and Report is not large enough to hold the result of the request. @retval EFI_TIMEOUT A timeout occurred executing the request. @retval EFI_DEVICE_ERROR The request failed due to a device error. @@ -244,12 +238,12 @@ UsbSetReportRequest ( EFI_STATUS EFIAPI UsbGetReportRequest ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT8 Interface, - IN UINT8 ReportId, - IN UINT8 ReportType, - IN UINT16 ReportLen, - IN UINT8 *Report + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT8 Interface, + IN UINT8 ReportId, + IN UINT8 ReportType, + IN UINT16 ReportLen, + OUT UINT8 *Report ); /** @@ -271,7 +265,7 @@ UsbGetReportRequest ( @retval EFI_SUCCESS The request executed successfully. @retval EFI_OUT_OF_RESOURCES The request could not be completed because the - buffer specifed by DescriptorLength and Descriptor + buffer specified by DescriptorLength and Descriptor is not large enough to hold the result of the request. @retval EFI_TIMEOUT A timeout occurred executing the request. @retval EFI_DEVICE_ERROR The request failed due to a device error. The transfer @@ -507,7 +501,7 @@ UsbClearFeature ( Get the status of the specified device. Submit a USB device get status request for the USB device specified by UsbIo, - Recipient, and Target and place the result in the buffer specified by DeviceStatus. + Recipient, and Target, and place the result in the buffer specified by DeviceStatus. The status of the transfer is returned in Status. If UsbIo is NULL, then ASSERT(). If DeviceStatus is NULL, then ASSERT().