]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiUsbLib/hid.c
Removed MdePkg usage of ModuleName: in file headers
[mirror_edk2.git] / MdePkg / Library / UefiUsbLib / hid.c
index a1019a0f2d228a301ff4b53b0d4632539279d9f0..185fc7b7f57e65a3e61cb0f25e1fe441527090b4 100644 (file)
@@ -1,54 +1,42 @@
-/*++\r
+/** @file\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
-All rights reserved. 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
-                                                                                          \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
+Copyright (c) 2004, Intel Corporation\r
+All rights reserved. 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
 \r
-  Module Name:\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
 \r
-    hid.c\r
 \r
-  Abstract:\r
+**/\r
+#include <PiDxe.h>\r
+#include <Library/UsbLib.h>\r
 \r
-    HID class request\r
+//\r
+// Function to get HID descriptor\r
+//\r
 \r
-  Revision History\r
+/**\r
+  Get Hid Descriptor\r
 \r
---*/\r
+  @param  UsbIo             EFI_USB_IO_PROTOCOL\r
+  @param  InterfaceNum      Hid interface number\r
+  @param  HidDescriptor     Caller allocated buffer to store Usb hid descriptor if\r
+                            successfully returned.\r
 \r
-#include "UefiUsbLibInternal.h"\r
+  @return EFI_SUCCESS\r
+  @return EFI_DEVICE_ERROR\r
+  @return EFI_TIMEOUT\r
 \r
-//\r
-// Function to get HID descriptor\r
-//\r
+**/\r
 EFI_STATUS\r
 UsbGetHidDescriptor (\r
   IN  EFI_USB_IO_PROTOCOL        *UsbIo,\r
   IN  UINT8                      InterfaceNum,\r
   OUT EFI_USB_HID_DESCRIPTOR     *HidDescriptor\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Get Hid Descriptor\r
-\r
-  Arguments:\r
-    UsbIo             -   EFI_USB_IO_PROTOCOL\r
-    InterfaceNum      -   Hid interface number\r
-    HidDescriptor     -   Caller allocated buffer to store Usb hid descriptor\r
-                          if successfully returned.\r
-\r
-  Returns:\r
-    EFI_SUCCESS\r
-    EFI_DEVICE_ERROR\r
-    EFI_TIMEOUT\r
-\r
---*/\r
 {\r
   UINT32                  Status;\r
   EFI_STATUS              Result;\r
@@ -76,6 +64,21 @@ UsbGetHidDescriptor (
 //\r
 // Function to get Report Class descriptor\r
 //\r
+\r
+/**\r
+  get Report Class descriptor\r
+\r
+  @param  UsbIo             EFI_USB_IO_PROTOCOL.\r
+  @param  InterfaceNum      Report interface number.\r
+  @param  DescriptorSize    Length of DescriptorBuffer.\r
+  @param  DescriptorBuffer  Caller allocated buffer to store Usb report descriptor\r
+                            if successfully returned.\r
+\r
+  @return EFI_SUCCESS\r
+  @return EFI_DEVICE_ERROR\r
+  @return EFI_TIMEOUT\r
+\r
+**/\r
 EFI_STATUS\r
 UsbGetReportDescriptor (\r
   IN  EFI_USB_IO_PROTOCOL     *UsbIo,\r
@@ -83,24 +86,6 @@ UsbGetReportDescriptor (
   IN  UINT16                  DescriptorSize,\r
   OUT UINT8                   *DescriptorBuffer\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    get Report Class descriptor\r
-\r
-  Arguments:\r
-    UsbIo             -   EFI_USB_IO_PROTOCOL.\r
-    InterfaceNum      -   Report interface number.\r
-    DescriptorSize    -   Length of DescriptorBuffer.\r
-    DescriptorBuffer  -   Caller allocated buffer to store Usb report descriptor\r
-                          if successfully returned.\r
-\r
-  Returns:\r
-    EFI_SUCCESS\r
-    EFI_DEVICE_ERROR\r
-    EFI_TIMEOUT\r
-\r
---*/\r
 {\r
   UINT32                  Status;\r
   EFI_STATUS              Result;\r
@@ -131,28 +116,25 @@ UsbGetReportDescriptor (
 //\r
 // Following are HID class request\r
 //\r
+\r
+/**\r
+  Get Hid Protocol Request\r
+\r
+  @param  UsbIo             EFI_USB_IO_PROTOCOL\r
+  @param  Interface         Which interface the caller wants to get protocol\r
+  @param  Protocol          Protocol value returned.\r
+\r
+  @return EFI_SUCCESS\r
+  @return EFI_DEVICE_ERROR\r
+  @return EFI_TIMEOUT\r
+\r
+**/\r
 EFI_STATUS\r
 UsbGetProtocolRequest (\r
   IN EFI_USB_IO_PROTOCOL     *UsbIo,\r
   IN UINT8                   Interface,\r
   IN UINT8                   *Protocol\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Get Hid Protocol Request\r
-\r
-  Arguments:\r
-    UsbIo             -   EFI_USB_IO_PROTOCOL\r
-    Interface         -   Which interface the caller wants to get protocol\r
-    Protocol          -   Protocol value returned.\r
-\r
-  Returns:\r
-    EFI_SUCCESS\r
-    EFI_DEVICE_ERROR\r
-    EFI_TIMEOUT\r
-\r
---*/\r
 {\r
   UINT32                  Status;\r
   EFI_STATUS              Result;\r
@@ -184,28 +166,25 @@ UsbGetProtocolRequest (
 }\r
 \r
 \r
+\r
+/**\r
+  Set Hid Protocol Request\r
+\r
+  @param  UsbIo             EFI_USB_IO_PROTOCOL\r
+  @param  Interface         Which interface the caller wants to set protocol\r
+  @param  Protocol          Protocol value the caller wants to set.\r
+\r
+  @return EFI_SUCCESS\r
+  @return EFI_DEVICE_ERROR\r
+  @return EFI_TIMEOUT\r
+\r
+**/\r
 EFI_STATUS\r
 UsbSetProtocolRequest (\r
   IN EFI_USB_IO_PROTOCOL     *UsbIo,\r
   IN UINT8                   Interface,\r
   IN UINT8                   Protocol\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Set Hid Protocol Request\r
-\r
-  Arguments:\r
-    UsbIo             -   EFI_USB_IO_PROTOCOL\r
-    Interface         -   Which interface the caller wants to set protocol\r
-    Protocol          -   Protocol value the caller wants to set.\r
-\r
-  Returns:\r
-    EFI_SUCCESS\r
-    EFI_DEVICE_ERROR\r
-    EFI_TIMEOUT\r
-\r
---*/\r
 {\r
   UINT32                  Status;\r
   EFI_STATUS              Result;\r
@@ -236,6 +215,20 @@ UsbSetProtocolRequest (
 }\r
 \r
 \r
+\r
+/**\r
+  Set Idel request.\r
+\r
+  @param  UsbIo             EFI_USB_IO_PROTOCOL\r
+  @param  Interface         Which interface the caller wants to set.\r
+  @param  ReportId          Which report the caller wants to set.\r
+  @param  Duration          Idle rate the caller wants to set.\r
+\r
+  @return EFI_SUCCESS\r
+  @return EFI_DEVICE_ERROR\r
+  @return EFI_TIMEOUT\r
+\r
+**/\r
 EFI_STATUS\r
 UsbSetIdleRequest (\r
   IN EFI_USB_IO_PROTOCOL     *UsbIo,\r
@@ -243,23 +236,6 @@ UsbSetIdleRequest (
   IN UINT8                   ReportId,\r
   IN UINT8                   Duration\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Set Idel request.\r
-\r
-  Arguments:\r
-    UsbIo             -   EFI_USB_IO_PROTOCOL\r
-    Interface         -   Which interface the caller wants to set.\r
-    ReportId          -   Which report the caller wants to set.\r
-    Duration          -   Idle rate the caller wants to set.\r
-\r
-  Returns:\r
-    EFI_SUCCESS\r
-    EFI_DEVICE_ERROR\r
-    EFI_TIMEOUT\r
-\r
---*/\r
 {\r
   UINT32                  Status;\r
   EFI_STATUS              Result;\r
@@ -289,6 +265,20 @@ UsbSetIdleRequest (
   return Result;\r
 }\r
 \r
+\r
+/**\r
+  Get Idel request.\r
+\r
+  @param  UsbIo             EFI_USB_IO_PROTOCOL\r
+  @param  Interface         Which interface the caller wants to get.\r
+  @param  ReportId          Which report the caller wants to get.\r
+  @param  Duration          Idle rate the caller wants to get.\r
+\r
+  @return EFI_SUCCESS\r
+  @return EFI_DEVICE_ERROR\r
+  @return EFI_TIMEOUT\r
+\r
+**/\r
 EFI_STATUS\r
 UsbGetIdleRequest (\r
   IN  EFI_USB_IO_PROTOCOL     *UsbIo,\r
@@ -296,23 +286,6 @@ UsbGetIdleRequest (
   IN  UINT8                   ReportId,\r
   OUT UINT8                   *Duration\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Get Idel request.\r
-\r
-  Arguments:\r
-    UsbIo             -   EFI_USB_IO_PROTOCOL\r
-    Interface         -   Which interface the caller wants to get.\r
-    ReportId          -   Which report the caller wants to get.\r
-    Duration          -   Idle rate the caller wants to get.\r
-\r
-  Returns:\r
-    EFI_SUCCESS\r
-    EFI_DEVICE_ERROR\r
-    EFI_TIMEOUT\r
-\r
---*/\r
 {\r
   UINT32                  Status;\r
   EFI_STATUS              Result;\r
@@ -344,6 +317,22 @@ UsbGetIdleRequest (
 }\r
 \r
 \r
+\r
+/**\r
+  Hid Set Report request.\r
+\r
+  @param  UsbIo             EFI_USB_IO_PROTOCOL\r
+  @param  Interface         Which interface the caller wants to set.\r
+  @param  ReportId          Which report the caller wants to set.\r
+  @param  ReportType        Type of report.\r
+  @param  ReportLen         Length of report descriptor.\r
+  @param  Report            Report Descriptor buffer.\r
+\r
+  @return EFI_SUCCESS\r
+  @return EFI_DEVICE_ERROR\r
+  @return EFI_TIMEOUT\r
+\r
+**/\r
 EFI_STATUS\r
 UsbSetReportRequest (\r
   IN EFI_USB_IO_PROTOCOL     *UsbIo,\r
@@ -353,25 +342,6 @@ UsbSetReportRequest (
   IN UINT16                  ReportLen,\r
   IN UINT8                   *Report\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Hid Set Report request.\r
-\r
-  Arguments:\r
-    UsbIo             -   EFI_USB_IO_PROTOCOL\r
-    Interface         -   Which interface the caller wants to set.\r
-    ReportId          -   Which report the caller wants to set.\r
-    ReportType        -   Type of report.\r
-    ReportLen         -   Length of report descriptor.\r
-    Report            -   Report Descriptor buffer.\r
-\r
-  Returns:\r
-    EFI_SUCCESS\r
-    EFI_DEVICE_ERROR\r
-    EFI_TIMEOUT\r
-\r
---*/\r
 {\r
   UINT32                  Status;\r
   EFI_STATUS              Result;\r
@@ -402,6 +372,22 @@ UsbSetReportRequest (
   return Result;\r
 }\r
 \r
+\r
+/**\r
+  Hid Set Report request.\r
+\r
+  @param  UsbIo             EFI_USB_IO_PROTOCOL\r
+  @param  Interface         Which interface the caller wants to set.\r
+  @param  ReportId          Which report the caller wants to set.\r
+  @param  ReportType        Type of report.\r
+  @param  ReportLen         Length of report descriptor.\r
+  @param  Report            Caller allocated buffer to store Report Descriptor.\r
+\r
+  @return EFI_SUCCESS\r
+  @return EFI_DEVICE_ERROR\r
+  @return EFI_TIMEOUT\r
+\r
+**/\r
 EFI_STATUS\r
 UsbGetReportRequest (\r
   IN EFI_USB_IO_PROTOCOL     *UsbIo,\r
@@ -411,25 +397,6 @@ UsbGetReportRequest (
   IN UINT16                  ReportLen,\r
   IN UINT8                   *Report\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Hid Set Report request.\r
-\r
-  Arguments:\r
-    UsbIo             -   EFI_USB_IO_PROTOCOL\r
-    Interface         -   Which interface the caller wants to set.\r
-    ReportId          -   Which report the caller wants to set.\r
-    ReportType        -   Type of report.\r
-    ReportLen         -   Length of report descriptor.\r
-    Report            -   Caller allocated buffer to store Report Descriptor.\r
-\r
-  Returns:\r
-    EFI_SUCCESS\r
-    EFI_DEVICE_ERROR\r
-    EFI_TIMEOUT\r
-\r
---*/\r
 {\r
   UINT32                  Status;\r
   EFI_STATUS              Result;\r