]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiUsbLib/Hid.c
MdePkg/BaseMemoryLib: Fix VS2015 build error
[mirror_edk2.git] / MdePkg / Library / UefiUsbLib / Hid.c
index 95b6a5969fe9ad46d8f215d991a2c862041bdfb6..29d4e9dcf76698ac23639485c5c99ce716787944 100644 (file)
@@ -3,11 +3,11 @@
   The library provides USB HID Class standard and specific requests defined\r
   in USB HID Firmware Specification 7 section : Requests.\r
   \r
-  Copyright (c) 2004, Intel Corporation\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
+  http://opensource.org/licenses/bsd-license.php.\r
   \r
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
@@ -39,7 +39,7 @@
 \r
   @param  UsbIo          A pointer to the USB I/O Protocol instance for the specific USB target.\r
   @param  Interface      The index of the HID interface on the USB target.\r
-  @param  HidDescriptor  Pointer to the USB HID descriptor that was retrieved from\r
+  @param  HidDescriptor  The pointer to the USB HID descriptor that was retrieved from\r
                          the specified USB target and interface. Type EFI_USB_HID_DESCRIPTOR\r
                          is defined in the MDE Package Industry Standard include file Usb.h.\r
 \r
@@ -67,13 +67,13 @@ UsbGetHidDescriptor (
   Request.Request     = USB_REQ_GET_DESCRIPTOR;\r
   Request.Value       = (UINT16) (USB_DESC_TYPE_HID << 8);\r
   Request.Index       = Interface;\r
-  Request.Length      = sizeof (EFI_USB_HID_DESCRIPTOR);\r
+  Request.Length      = (UINT16) sizeof (EFI_USB_HID_DESCRIPTOR);\r
 \r
   Result = UsbIo->UsbControlTransfer (\r
                     UsbIo,\r
                     &Request,\r
                     EfiUsbDataIn,\r
-                    TIMEOUT_VALUE,\r
+                    PcdGet32 (PcdUsbTransferTimeoutValue),\r
                     HidDescriptor,\r
                     sizeof (EFI_USB_HID_DESCRIPTOR),\r
                     &Status\r
@@ -133,7 +133,7 @@ UsbGetReportDescriptor (
                     UsbIo,\r
                     &Request,\r
                     EfiUsbDataIn,\r
-                    TIMEOUT_VALUE,\r
+                    PcdGet32 (PcdUsbTransferTimeoutValue),\r
                     DescriptorBuffer,\r
                     DescriptorLength,\r
                     &Status\r
@@ -165,7 +165,7 @@ EFIAPI
 UsbGetProtocolRequest (\r
   IN EFI_USB_IO_PROTOCOL     *UsbIo,\r
   IN UINT8                   Interface,\r
-  IN UINT8                   *Protocol\r
+  OUT UINT8                   *Protocol\r
   )\r
 {\r
   UINT32                  Status;\r
@@ -188,7 +188,7 @@ UsbGetProtocolRequest (
                     UsbIo,\r
                     &Request,\r
                     EfiUsbDataIn,\r
-                    TIMEOUT_VALUE,\r
+                    PcdGet32 (PcdUsbTransferTimeoutValue),\r
                     Protocol,\r
                     sizeof (UINT8),\r
                     &Status\r
@@ -242,7 +242,7 @@ UsbSetProtocolRequest (
                     UsbIo,\r
                     &Request,\r
                     EfiUsbNoData,\r
-                    TIMEOUT_VALUE,\r
+                    PcdGet32 (PcdUsbTransferTimeoutValue),\r
                     NULL,\r
                     0,\r
                     &Status\r
@@ -295,7 +295,7 @@ UsbSetIdleRequest (
                     UsbIo,\r
                     &Request,\r
                     EfiUsbNoData,\r
-                    TIMEOUT_VALUE,\r
+                    PcdGet32 (PcdUsbTransferTimeoutValue),\r
                     NULL,\r
                     0,\r
                     &Status\r
@@ -350,7 +350,7 @@ UsbGetIdleRequest (
                     UsbIo,\r
                     &Request,\r
                     EfiUsbDataIn,\r
-                    TIMEOUT_VALUE,\r
+                    PcdGet32 (PcdUsbTransferTimeoutValue),\r
                     Duration,\r
                     1,\r
                     &Status\r
@@ -413,7 +413,7 @@ UsbSetReportRequest (
                     UsbIo,\r
                     &Request,\r
                     EfiUsbDataOut,\r
-                    TIMEOUT_VALUE,\r
+                    PcdGet32 (PcdUsbTransferTimeoutValue),\r
                     Report,\r
                     ReportLen,\r
                     &Status\r
@@ -441,7 +441,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
@@ -450,12 +450,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
   UINT32                  Status;\r
@@ -478,7 +478,7 @@ UsbGetReportRequest (
                     UsbIo,\r
                     &Request,\r
                     EfiUsbDataIn,\r
-                    TIMEOUT_VALUE,\r
+                    PcdGet32 (PcdUsbTransferTimeoutValue),\r
                     Report,\r
                     ReportLen,\r
                     &Status\r