/* Uses USB I/O to check whether the device is a USB mouse device. */
BOOLEAN IsUsbMouse(IN EFI_USB_IO_PROTOCOL *UsbIo)
/* Uses USB I/O to check whether the device is a USB mouse device. */
BOOLEAN IsUsbMouse(IN EFI_USB_IO_PROTOCOL *UsbIo)
{
  EFI_STATUS                    Status;
  EFI_USB_INTERFACE_DESCRIPTOR  InterfaceDescriptor;
  Status = UsbIo->UsbGetInterfaceDescriptor (
                    UsbIo,
                    &InterfaceDescriptor
                    );
  if (EFI_ERROR (Status)) {
    return FALSE;
  }
  if ((InterfaceDescriptor.InterfaceClass == CLASS_HID) &&
      (InterfaceDescriptor.InterfaceSubClass == SUBCLASS_BOOT) &&
      (InterfaceDescriptor.InterfaceProtocol == PROTOCOL_MOUSE)
      )
  {
    return TRUE;
  }
  return FALSE;
}