EFI_STATUS\r
EFIAPI\r
UsbGetHidDescriptor (\r
- IN EFI_USB_IO_PROTOCOL *UsbIo,\r
- IN UINT8 Interface,\r
- OUT EFI_USB_HID_DESCRIPTOR *HidDescriptor\r
+ IN EFI_USB_IO_PROTOCOL *UsbIo,\r
+ IN UINT8 Interface,\r
+ OUT EFI_USB_HID_DESCRIPTOR *HidDescriptor\r
)\r
{\r
UINT32 Status;\r
EFI_STATUS Result;\r
EFI_USB_DEVICE_REQUEST Request;\r
\r
- ASSERT(UsbIo != NULL);\r
- ASSERT(HidDescriptor != NULL);\r
+ ASSERT (UsbIo != NULL);\r
+ ASSERT (HidDescriptor != NULL);\r
\r
Request.RequestType = USB_HID_GET_DESCRIPTOR_REQ_TYPE;\r
Request.Request = USB_REQ_GET_DESCRIPTOR;\r
- Request.Value = (UINT16) (USB_DESC_TYPE_HID << 8);\r
+ Request.Value = (UINT16)(USB_DESC_TYPE_HID << 8);\r
Request.Index = Interface;\r
- Request.Length = (UINT16) sizeof (EFI_USB_HID_DESCRIPTOR);\r
+ Request.Length = (UINT16)sizeof (EFI_USB_HID_DESCRIPTOR);\r
\r
Result = UsbIo->UsbControlTransfer (\r
UsbIo,\r
);\r
\r
return Result;\r
-\r
}\r
\r
/**\r
EFI_STATUS\r
EFIAPI\r
UsbGetReportDescriptor (\r
- IN EFI_USB_IO_PROTOCOL *UsbIo,\r
- IN UINT8 Interface,\r
- IN UINT16 DescriptorLength,\r
- OUT UINT8 *DescriptorBuffer\r
+ IN EFI_USB_IO_PROTOCOL *UsbIo,\r
+ IN UINT8 Interface,\r
+ IN UINT16 DescriptorLength,\r
+ OUT UINT8 *DescriptorBuffer\r
)\r
{\r
UINT32 Status;\r
//\r
Request.RequestType = USB_HID_GET_DESCRIPTOR_REQ_TYPE;\r
Request.Request = USB_REQ_GET_DESCRIPTOR;\r
- Request.Value = (UINT16) (USB_DESC_TYPE_REPORT << 8);\r
+ Request.Value = (UINT16)(USB_DESC_TYPE_REPORT << 8);\r
Request.Index = Interface;\r
Request.Length = DescriptorLength;\r
\r
);\r
\r
return Result;\r
-\r
}\r
\r
/**\r
EFI_STATUS\r
EFIAPI\r
UsbGetProtocolRequest (\r
- IN EFI_USB_IO_PROTOCOL *UsbIo,\r
- IN UINT8 Interface,\r
- OUT UINT8 *Protocol\r
+ IN EFI_USB_IO_PROTOCOL *UsbIo,\r
+ IN UINT8 Interface,\r
+ OUT UINT8 *Protocol\r
)\r
{\r
UINT32 Status;\r
// Fill Device request packet\r
//\r
Request.RequestType = USB_HID_CLASS_GET_REQ_TYPE;\r
- Request.Request = EFI_USB_GET_PROTOCOL_REQUEST;\r
- Request.Value = 0;\r
- Request.Index = Interface;\r
- Request.Length = 1;\r
+ Request.Request = EFI_USB_GET_PROTOCOL_REQUEST;\r
+ Request.Value = 0;\r
+ Request.Index = Interface;\r
+ Request.Length = 1;\r
\r
Result = UsbIo->UsbControlTransfer (\r
UsbIo,\r
return Result;\r
}\r
\r
-\r
-\r
/**\r
Set the HID protocol of the specified USB HID interface.\r
\r
EFI_STATUS\r
EFIAPI\r
UsbSetProtocolRequest (\r
- IN EFI_USB_IO_PROTOCOL *UsbIo,\r
- IN UINT8 Interface,\r
- IN UINT8 Protocol\r
+ IN EFI_USB_IO_PROTOCOL *UsbIo,\r
+ IN UINT8 Interface,\r
+ IN UINT8 Protocol\r
)\r
{\r
UINT32 Status;\r
// Fill Device request packet\r
//\r
Request.RequestType = USB_HID_CLASS_SET_REQ_TYPE;\r
- Request.Request = EFI_USB_SET_PROTOCOL_REQUEST;\r
- Request.Value = Protocol;\r
- Request.Index = Interface;\r
- Request.Length = 0;\r
+ Request.Request = EFI_USB_SET_PROTOCOL_REQUEST;\r
+ Request.Value = Protocol;\r
+ Request.Index = Interface;\r
+ Request.Length = 0;\r
\r
Result = UsbIo->UsbControlTransfer (\r
UsbIo,\r
return Result;\r
}\r
\r
-\r
/**\r
Set the idle rate of the specified USB HID report.\r
\r
EFI_STATUS\r
EFIAPI\r
UsbSetIdleRequest (\r
- IN EFI_USB_IO_PROTOCOL *UsbIo,\r
- IN UINT8 Interface,\r
- IN UINT8 ReportId,\r
- IN UINT8 Duration\r
+ IN EFI_USB_IO_PROTOCOL *UsbIo,\r
+ IN UINT8 Interface,\r
+ IN UINT8 ReportId,\r
+ IN UINT8 Duration\r
)\r
{\r
UINT32 Status;\r
// Fill Device request packet\r
//\r
Request.RequestType = USB_HID_CLASS_SET_REQ_TYPE;\r
- Request.Request = EFI_USB_SET_IDLE_REQUEST;\r
- Request.Value = (UINT16) ((Duration << 8) | ReportId);\r
- Request.Index = Interface;\r
- Request.Length = 0;\r
+ Request.Request = EFI_USB_SET_IDLE_REQUEST;\r
+ Request.Value = (UINT16)((Duration << 8) | ReportId);\r
+ Request.Index = Interface;\r
+ Request.Length = 0;\r
\r
Result = UsbIo->UsbControlTransfer (\r
UsbIo,\r
return Result;\r
}\r
\r
-\r
/**\r
Get the idle rate of the specified USB HID report.\r
\r
EFI_STATUS\r
EFIAPI\r
UsbGetIdleRequest (\r
- IN EFI_USB_IO_PROTOCOL *UsbIo,\r
- IN UINT8 Interface,\r
- IN UINT8 ReportId,\r
- OUT UINT8 *Duration\r
+ IN EFI_USB_IO_PROTOCOL *UsbIo,\r
+ IN UINT8 Interface,\r
+ IN UINT8 ReportId,\r
+ OUT UINT8 *Duration\r
)\r
{\r
UINT32 Status;\r
// Fill Device request packet\r
//\r
Request.RequestType = USB_HID_CLASS_GET_REQ_TYPE;\r
- Request.Request = EFI_USB_GET_IDLE_REQUEST;\r
- Request.Value = ReportId;\r
- Request.Index = Interface;\r
- Request.Length = 1;\r
+ Request.Request = EFI_USB_GET_IDLE_REQUEST;\r
+ Request.Value = ReportId;\r
+ Request.Index = Interface;\r
+ Request.Length = 1;\r
\r
Result = UsbIo->UsbControlTransfer (\r
UsbIo,\r
return Result;\r
}\r
\r
-\r
-\r
/**\r
Set the report descriptor of the specified USB HID interface.\r
\r
EFI_STATUS\r
EFIAPI\r
UsbSetReportRequest (\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
+ IN UINT8 *Report\r
)\r
{\r
UINT32 Status;\r
// Fill Device request packet\r
//\r
Request.RequestType = USB_HID_CLASS_SET_REQ_TYPE;\r
- Request.Request = EFI_USB_SET_REPORT_REQUEST;\r
- Request.Value = (UINT16) ((ReportType << 8) | ReportId);\r
- Request.Index = Interface;\r
- Request.Length = ReportLen;\r
+ Request.Request = EFI_USB_SET_REPORT_REQUEST;\r
+ Request.Value = (UINT16)((ReportType << 8) | ReportId);\r
+ Request.Index = Interface;\r
+ Request.Length = ReportLen;\r
\r
Result = UsbIo->UsbControlTransfer (\r
UsbIo,\r
return Result;\r
}\r
\r
-\r
/**\r
Get the report descriptor of the specified USB HID interface.\r
\r
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
- OUT 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
// Fill Device request packet\r
//\r
Request.RequestType = USB_HID_CLASS_GET_REQ_TYPE;\r
- Request.Request = EFI_USB_GET_REPORT_REQUEST;\r
- Request.Value = (UINT16) ((ReportType << 8) | ReportId);\r
- Request.Index = Interface;\r
- Request.Length = ReportLen;\r
+ Request.Request = EFI_USB_GET_REPORT_REQUEST;\r
+ Request.Value = (UINT16)((ReportType << 8) | ReportId);\r
+ Request.Index = Interface;\r
+ Request.Length = ReportLen;\r
\r
Result = UsbIo->UsbControlTransfer (\r
UsbIo,\r