-/*++\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
//\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
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
//\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
}\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
}\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
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
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
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
}\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
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
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
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