if (EFI_ERROR (Status)) {\r
goto ErrorExit;\r
}\r
+\r
+ //\r
+ // Report Status Code here since USB mouse will be detected next.\r
+ //\r
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (\r
+ EFI_PROGRESS_CODE,\r
+ (EFI_PERIPHERAL_MOUSE | EFI_P_PC_PRESENCE_DETECT),\r
+ UsbMouseDevice->DevicePath\r
+ );\r
+\r
//\r
// Get interface & endpoint descriptor\r
//\r
\r
if (!Found) {\r
//\r
+ // Report Status Code to indicate that there is no USB mouse\r
+ //\r
+ REPORT_STATUS_CODE (\r
+ EFI_ERROR_CODE | EFI_ERROR_MINOR,\r
+ (EFI_PERIPHERAL_MOUSE | EFI_P_EC_NOT_DETECTED)\r
+ );\r
+ //\r
// No interrupt endpoint found, then return unsupported.\r
//\r
Status = EFI_UNSUPPORTED;\r
goto ErrorExit;\r
}\r
\r
+ //\r
+ // Report Status Code here since USB mouse has be detected.\r
+ //\r
+ REPORT_STATUS_CODE_WITH_DEVICE_PATH (\r
+ EFI_PROGRESS_CODE,\r
+ (EFI_PERIPHERAL_MOUSE | EFI_P_PC_DETECTED),\r
+ UsbMouseDevice->DevicePath\r
+ );\r
+\r
Status = InitializeUsbMouseDevice (UsbMouseDevice);\r
if (EFI_ERROR (Status)) {\r
//\r
EFI_STATUS Status;\r
EFI_USB_HID_DESCRIPTOR *MouseHidDesc;\r
UINT8 *ReportDesc;\r
- UINT8 ReportId;\r
- UINT8 Duration;\r
EFI_USB_CONFIG_DESCRIPTOR ConfigDesc;\r
VOID *Buf;\r
UINT32 TransferResult;\r
}\r
}\r
\r
- //\r
- // ReportId is zero, which means the idle rate applies to all input reports.\r
- //\r
- ReportId = 0;\r
- //\r
- // Duration is zero, which means the duration is infinite.\r
- // so the endpoint will inhibit reporting forever,\r
- // and only reporting when a change is detected in the report data.\r
- //\r
- Duration = 0;\r
- UsbSetIdleRequest (\r
- UsbIo,\r
- UsbMouseDev->InterfaceDescriptor.InterfaceNumber,\r
- ReportId,\r
- Duration\r
- );\r
-\r
FreePool (Buf);\r
FreePool (ReportDesc);\r
\r