]> git.proxmox.com Git - mirror_edk2.git/blobdiff - 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
index ff2c70c96b291875107f6c1e83386d707c1df7d8..9d15579053f9e8f5ad53274ececd4c06bad8b476 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
-  Provides most usb APIs to support the Hid requests defined in Usb Hid 1.1 spec\r
-  and the standard requests defined in Usb 1.1 spec.\r
+  Provides most USB APIs to support the Hid requests defined in USB Hid 1.1 spec\r
+  and the standard requests defined in USB 1.1 spec.\r
 \r
 Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
 All rights reserved. This program and the accompanying materials\r
@@ -20,16 +20,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/UsbIo.h>\r
 #include <IndustryStandard/Usb.h>\r
 \r
-///\r
-/// define the timeout time as 3ms\r
-///\r
-#define TIMEOUT_VALUE 3 * 1000\r
-\r
 /**\r
   Get the descriptor of the specified USB HID interface.\r
 \r
-  Submit a USB get HID descriptor request for the USB device specified by UsbIo\r
-  and Interface and return the HID descriptor in HidDescriptor.\r
+  Submit a UsbGetHidDescriptor() request for the USB device specified by UsbIo\r
+  and Interface, and return the HID descriptor in HidDescriptor.\r
   If UsbIo is NULL, then ASSERT().\r
   If HidDescriptor is NULL, then ASSERT().\r
 \r
@@ -57,7 +52,7 @@ UsbGetHidDescriptor (
   Get the report descriptor of the specified USB HID interface.\r
 \r
   Submit a USB get HID report descriptor request for the USB device specified by\r
-  UsbIo and Interface and return the report descriptor in DescriptorBuffer.\r
+  UsbIo and Interface, and return the report descriptor in DescriptorBuffer.\r
   If UsbIo is NULL, then ASSERT().\r
   If DescriptorBuffer is NULL, then ASSERT().\r
 \r
@@ -87,7 +82,7 @@ UsbGetReportDescriptor (
   Get the HID protocol of the specified USB HID interface.\r
 \r
   Submit a USB get HID protocol request for the USB device specified by UsbIo\r
-  and Interface and return the protocol retrieved in Protocol.\r
+  and Interface, and return the protocol retrieved in Protocol.\r
   If UsbIo is NULL, then ASSERT().\r
   If Protocol is NULL, then ASSERT().\r
 \r
@@ -105,14 +100,14 @@ EFIAPI
 UsbGetProtocolRequest (\r
   IN EFI_USB_IO_PROTOCOL     *UsbIo,\r
   IN UINT8                   Interface,\r
-  IN UINT8                   *Protocol\r
+  OUT UINT8                   *Protocol\r
   );\r
 \r
 /**\r
   Set the HID protocol of the specified USB HID interface.\r
 \r
   Submit a USB set HID protocol request for the USB device specified by UsbIo\r
-  and Interface and set the protocol to the value specified by Protocol.\r
+  and Interface, and set the protocol to the value specified by Protocol.\r
   If UsbIo is NULL, then ASSERT().\r
 \r
   @param  UsbIo      A pointer to the USB I/O Protocol instance for the specific USB target.\r
@@ -235,7 +230,7 @@ UsbSetReportRequest (
 \r
   @retval  EFI_SUCCESS           The request executed successfully.\r
   @retval  EFI_OUT_OF_RESOURCES  The request could not be completed because the\r
-                                 buffer specifed by ReportLength and Report is not\r
+                                 buffer specified by ReportLength and Report is not\r
                                  large enough to hold the result of the request.\r
   @retval  EFI_TIMEOUT           A timeout occurred executing the request.\r
   @retval  EFI_DEVICE_ERROR      The request failed due to a device error.\r
@@ -244,12 +239,12 @@ UsbSetReportRequest (
 EFI_STATUS\r
 EFIAPI\r
 UsbGetReportRequest (\r
-  IN EFI_USB_IO_PROTOCOL     *UsbIo,\r
-  IN UINT8                   Interface,\r
-  IN UINT8                   ReportId,\r
-  IN UINT8                   ReportType,\r
-  IN UINT16                  ReportLen,\r
-  IN UINT8                   *Report\r
+  IN  EFI_USB_IO_PROTOCOL     *UsbIo,\r
+  IN  UINT8                   Interface,\r
+  IN  UINT8                   ReportId,\r
+  IN  UINT8                   ReportType,\r
+  IN  UINT16                  ReportLen,\r
+  OUT UINT8                   *Report\r
   );\r
 \r
 /**\r
@@ -271,7 +266,7 @@ UsbGetReportRequest (
 \r
   @retval EFI_SUCCESS           The request executed successfully.\r
   @retval EFI_OUT_OF_RESOURCES  The request could not be completed because the\r
-                                buffer specifed by DescriptorLength and Descriptor\r
+                                buffer specified by DescriptorLength and Descriptor\r
                                 is not large enough to hold the result of the request.\r
   @retval EFI_TIMEOUT           A timeout occurred executing the request.\r
   @retval EFI_DEVICE_ERROR      The request failed due to a device error. The transfer\r
@@ -349,7 +344,7 @@ EFIAPI
 UsbGetInterface (\r
   IN  EFI_USB_IO_PROTOCOL     *UsbIo,\r
   IN  UINT16                  Interface,\r
-  OUT UINT                  *AlternateSetting,\r
+  OUT UINT16                  *AlternateSetting,\r
   OUT UINT32                  *Status\r
   );\r
 \r
@@ -406,7 +401,7 @@ EFI_STATUS
 EFIAPI\r
 UsbGetConfiguration (\r
   IN  EFI_USB_IO_PROTOCOL     *UsbIo,\r
-  OUT UINT                  *ConfigurationValue,\r
+  OUT UINT16                  *ConfigurationValue,\r
   OUT UINT32                  *Status\r
   );\r
 \r
@@ -507,7 +502,7 @@ UsbClearFeature (
   Get the status of the specified device.\r
 \r
   Submit a USB device get status request for the USB device specified by UsbIo,\r
-  Recipient, and Target and place the result in the buffer specified by DeviceStatus.\r
+  Recipient, and Target, and place the result in the buffer specified by DeviceStatus.\r
   The status of the transfer is returned in Status.\r
   If UsbIo is NULL, then ASSERT().\r
   If DeviceStatus is NULL, then ASSERT().\r