3 Copyright (c) 2004 - 2007, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
23 #include <Library/DebugLib.h>
24 #include <IndustryStandard/Usb.h>
28 // Driver Consumed Protocol Prototypes
30 //@MT:#include EFI_PROTOCOL_DEFINITION (DriverBinding)
31 //@MT:#include EFI_PROTOCOL_DEFINITION (UsbIo)
34 // Driver Produced Protocol Prototypes
36 //@MT:#include EFI_PROTOCOL_DEFINITION (SimplePointer)
38 //@MT:#include "UsbDxeLib.h"
39 //@MT:#include "hid.h"
45 // Driver model protocol interface
49 USBMouseDriverBindingEntryPoint (
50 IN EFI_HANDLE ImageHandle
,
51 IN EFI_SYSTEM_TABLE
*SystemTable
56 USBMouseDriverBindingSupported (
57 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
58 IN EFI_HANDLE Controller
,
59 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
64 USBMouseDriverBindingStart (
65 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
66 IN EFI_HANDLE Controller
,
67 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
72 USBMouseDriverBindingStop (
73 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
74 IN EFI_HANDLE Controller
,
75 IN UINTN NumberOfChildren
,
76 IN EFI_HANDLE
*ChildHandleBuffer
79 EFI_GUID gEfiUsbMouseDriverGuid
= {
80 0x290156b5, 0x6a05, 0x4ac0, 0xb8, 0x0, 0x51, 0x27, 0x55, 0xad, 0x14, 0x29
83 EFI_DRIVER_BINDING_PROTOCOL gUsbMouseDriverBinding
= {
84 USBMouseDriverBindingSupported
,
85 USBMouseDriverBindingStart
,
86 USBMouseDriverBindingStop
,
98 IN EFI_USB_IO_PROTOCOL
*UsbIo
103 InitializeUsbMouseDevice (
104 IN USB_MOUSE_DEV
*UsbMouseDev
110 UsbMouseWaitForInput (
116 // Mouse interrupt handler
121 OnMouseInterruptComplete (
135 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
136 OUT EFI_SIMPLE_POINTER_STATE
*MouseState
143 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
144 IN BOOLEAN ExtendedVerification
150 //@MT: EFI_DRIVER_ENTRY_POINT (USBMouseDriverBindingEntryPoint)
154 USBMouseDriverBindingEntryPoint (
155 IN EFI_HANDLE ImageHandle
,
156 IN EFI_SYSTEM_TABLE
*SystemTable
161 Entry point for EFI drivers.
164 ImageHandle - EFI_HANDLE
165 SystemTable - EFI_SYSTEM_TABLE
172 return EfiLibInstallAllDriverProtocols (
175 &gUsbMouseDriverBinding
,
177 &gUsbMouseComponentName
,
185 Test to see if this driver supports ControllerHandle. Any ControllerHandle
186 that has UsbHcProtocol installed will be supported.
188 @param This Protocol instance pointer.
189 @param Controller Handle of device to test
190 @param RemainingDevicePath Not used
192 @retval EFI_SUCCESS This driver supports this device.
193 @retval EFI_UNSUPPORTED This driver does not support this device.
198 USBMouseDriverBindingSupported (
199 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
200 IN EFI_HANDLE Controller
,
201 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
204 EFI_STATUS OpenStatus
;
205 EFI_USB_IO_PROTOCOL
*UsbIo
;
208 OpenStatus
= gBS
->OpenProtocol (
210 &gEfiUsbIoProtocolGuid
,
212 This
->DriverBindingHandle
,
214 EFI_OPEN_PROTOCOL_BY_DRIVER
216 if (EFI_ERROR (OpenStatus
) && (OpenStatus
!= EFI_ALREADY_STARTED
)) {
217 return EFI_UNSUPPORTED
;
220 if (OpenStatus
== EFI_ALREADY_STARTED
) {
221 return EFI_ALREADY_STARTED
;
225 // Use the USB I/O protocol interface to see the Controller is
226 // the Mouse controller that can be managed by this driver.
228 Status
= EFI_SUCCESS
;
229 if (!IsUsbMouse (UsbIo
)) {
230 Status
= EFI_UNSUPPORTED
;
235 &gEfiUsbIoProtocolGuid
,
236 This
->DriverBindingHandle
,
244 Starting the Usb Bus Driver
246 @param This Protocol instance pointer.
247 @param Controller Handle of device to test
248 @param RemainingDevicePath Not used
250 @retval EFI_SUCCESS This driver supports this device.
251 @retval EFI_UNSUPPORTED This driver does not support this device.
252 @retval EFI_DEVICE_ERROR This driver cannot be started due to device Error
253 EFI_OUT_OF_RESOURCES- Can't allocate memory
255 @retval EFI_ALREADY_STARTED Thios driver has been started
260 USBMouseDriverBindingStart (
261 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
262 IN EFI_HANDLE Controller
,
263 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
267 EFI_USB_IO_PROTOCOL
*UsbIo
;
268 EFI_USB_ENDPOINT_DESCRIPTOR
*EndpointDesc
;
269 USB_MOUSE_DEV
*UsbMouseDevice
;
270 UINT8 EndpointNumber
;
273 UINT8 PollingInterval
;
276 UsbMouseDevice
= NULL
;
277 Status
= EFI_SUCCESS
;
279 Status
= gBS
->OpenProtocol (
281 &gEfiUsbIoProtocolGuid
,
283 This
->DriverBindingHandle
,
285 EFI_OPEN_PROTOCOL_BY_DRIVER
287 if (EFI_ERROR (Status
)) {
291 UsbMouseDevice
= AllocateZeroPool (sizeof (USB_MOUSE_DEV
));
292 if (UsbMouseDevice
== NULL
) {
293 Status
= EFI_OUT_OF_RESOURCES
;
297 UsbMouseDevice
->UsbIo
= UsbIo
;
299 UsbMouseDevice
->Signature
= USB_MOUSE_DEV_SIGNATURE
;
301 UsbMouseDevice
->InterfaceDescriptor
= AllocatePool (sizeof (EFI_USB_INTERFACE_DESCRIPTOR
));
302 if (UsbMouseDevice
->InterfaceDescriptor
== NULL
) {
303 Status
= EFI_OUT_OF_RESOURCES
;
307 EndpointDesc
= AllocatePool (sizeof (EFI_USB_ENDPOINT_DESCRIPTOR
));
308 if (EndpointDesc
== NULL
) {
309 Status
= EFI_OUT_OF_RESOURCES
;
313 // Get the Device Path Protocol on Controller's handle
315 Status
= gBS
->OpenProtocol (
317 &gEfiDevicePathProtocolGuid
,
318 (VOID
**) &UsbMouseDevice
->DevicePath
,
319 This
->DriverBindingHandle
,
321 EFI_OPEN_PROTOCOL_GET_PROTOCOL
324 if (EFI_ERROR (Status
)) {
328 // Get interface & endpoint descriptor
330 UsbIo
->UsbGetInterfaceDescriptor (
332 UsbMouseDevice
->InterfaceDescriptor
335 EndpointNumber
= UsbMouseDevice
->InterfaceDescriptor
->NumEndpoints
;
337 for (Index
= 0; Index
< EndpointNumber
; Index
++) {
338 UsbIo
->UsbGetEndpointDescriptor (
344 if ((EndpointDesc
->Attributes
& 0x03) == 0x03) {
347 // We only care interrupt endpoint here
349 UsbMouseDevice
->IntEndpointDescriptor
= EndpointDesc
;
353 if (UsbMouseDevice
->IntEndpointDescriptor
== NULL
) {
355 // No interrupt endpoint, then error
357 Status
= EFI_UNSUPPORTED
;
361 Status
= InitializeUsbMouseDevice (UsbMouseDevice
);
362 if (EFI_ERROR (Status
)) {
363 MouseReportStatusCode (
364 UsbMouseDevice
->DevicePath
,
365 EFI_ERROR_CODE
| EFI_ERROR_MINOR
,
366 PcdGet32 (PcdStatusCodeValueMouseInterfaceError
)
372 UsbMouseDevice
->SimplePointerProtocol
.GetState
= GetMouseState
;
373 UsbMouseDevice
->SimplePointerProtocol
.Reset
= UsbMouseReset
;
374 UsbMouseDevice
->SimplePointerProtocol
.Mode
= &UsbMouseDevice
->Mode
;
376 Status
= gBS
->CreateEvent (
379 UsbMouseWaitForInput
,
381 &((UsbMouseDevice
->SimplePointerProtocol
).WaitForInput
)
383 if (EFI_ERROR (Status
)) {
387 Status
= gBS
->InstallProtocolInterface (
389 &gEfiSimplePointerProtocolGuid
,
390 EFI_NATIVE_INTERFACE
,
391 &UsbMouseDevice
->SimplePointerProtocol
394 if (EFI_ERROR (Status
)) {
395 Status
= EFI_DEVICE_ERROR
;
400 // After Enabling Async Interrupt Transfer on this mouse Device
401 // we will be able to get key data from it. Thus this is deemed as
402 // the enable action of the mouse
405 MouseReportStatusCode (
406 UsbMouseDevice
->DevicePath
,
408 PcdGet32 (PcdStatusCodeValueMouseEnable
)
412 // submit async interrupt transfer
414 EndpointAddr
= UsbMouseDevice
->IntEndpointDescriptor
->EndpointAddress
;
415 PollingInterval
= UsbMouseDevice
->IntEndpointDescriptor
->Interval
;
416 PacketSize
= (UINT8
) (UsbMouseDevice
->IntEndpointDescriptor
->MaxPacketSize
);
418 Status
= UsbIo
->UsbAsyncInterruptTransfer (
424 OnMouseInterruptComplete
,
428 if (!EFI_ERROR (Status
)) {
430 UsbMouseDevice
->ControllerNameTable
= NULL
;
433 gUsbMouseComponentName
.SupportedLanguages
,
434 &UsbMouseDevice
->ControllerNameTable
,
442 // If submit error, uninstall that interface
444 Status
= EFI_DEVICE_ERROR
;
445 gBS
->UninstallProtocolInterface (
447 &gEfiSimplePointerProtocolGuid
,
448 &UsbMouseDevice
->SimplePointerProtocol
452 if (EFI_ERROR (Status
)) {
455 &gEfiUsbIoProtocolGuid
,
456 This
->DriverBindingHandle
,
460 if (UsbMouseDevice
!= NULL
) {
461 if (UsbMouseDevice
->InterfaceDescriptor
!= NULL
) {
462 gBS
->FreePool (UsbMouseDevice
->InterfaceDescriptor
);
465 if (UsbMouseDevice
->IntEndpointDescriptor
!= NULL
) {
466 gBS
->FreePool (UsbMouseDevice
->IntEndpointDescriptor
);
469 if ((UsbMouseDevice
->SimplePointerProtocol
).WaitForInput
!= NULL
) {
470 gBS
->CloseEvent ((UsbMouseDevice
->SimplePointerProtocol
).WaitForInput
);
473 gBS
->FreePool (UsbMouseDevice
);
474 UsbMouseDevice
= NULL
;
483 Stop this driver on ControllerHandle. Support stoping any child handles
484 created by this driver.
486 @param This Protocol instance pointer.
487 @param Controller Handle of device to stop driver on
488 @param NumberOfChildren Number of Children in the ChildHandleBuffer
489 @param ChildHandleBuffer List of handles for the children we need to stop.
492 @return EFI_DEVICE_ERROR
498 USBMouseDriverBindingStop (
499 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
500 IN EFI_HANDLE Controller
,
501 IN UINTN NumberOfChildren
,
502 IN EFI_HANDLE
*ChildHandleBuffer
506 USB_MOUSE_DEV
*UsbMouseDevice
;
507 EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointerProtocol
;
508 EFI_USB_IO_PROTOCOL
*UsbIo
;
511 // Get our context back.
513 Status
= gBS
->OpenProtocol (
515 &gEfiSimplePointerProtocolGuid
,
516 &SimplePointerProtocol
,
517 This
->DriverBindingHandle
,
519 EFI_OPEN_PROTOCOL_GET_PROTOCOL
522 if (EFI_ERROR (Status
)) {
523 return EFI_UNSUPPORTED
;
526 UsbMouseDevice
= USB_MOUSE_DEV_FROM_MOUSE_PROTOCOL (SimplePointerProtocol
);
530 &gEfiSimplePointerProtocolGuid
,
531 This
->DriverBindingHandle
,
535 UsbIo
= UsbMouseDevice
->UsbIo
;
538 // Uninstall the Asyn Interrupt Transfer from this device
539 // will disable the mouse data input from this device
541 MouseReportStatusCode (
542 UsbMouseDevice
->DevicePath
,
544 PcdGet32 (PcdStatusCodeValueMouseDisable
)
548 // Delete Mouse Async Interrupt Transfer
550 UsbIo
->UsbAsyncInterruptTransfer (
552 UsbMouseDevice
->IntEndpointDescriptor
->EndpointAddress
,
554 UsbMouseDevice
->IntEndpointDescriptor
->Interval
,
560 gBS
->CloseEvent (UsbMouseDevice
->SimplePointerProtocol
.WaitForInput
);
562 if (UsbMouseDevice
->DelayedRecoveryEvent
) {
563 gBS
->CloseEvent (UsbMouseDevice
->DelayedRecoveryEvent
);
564 UsbMouseDevice
->DelayedRecoveryEvent
= 0;
567 Status
= gBS
->UninstallProtocolInterface (
569 &gEfiSimplePointerProtocolGuid
,
570 &UsbMouseDevice
->SimplePointerProtocol
572 if (EFI_ERROR (Status
)) {
578 &gEfiUsbIoProtocolGuid
,
579 This
->DriverBindingHandle
,
583 gBS
->FreePool (UsbMouseDevice
->InterfaceDescriptor
);
584 gBS
->FreePool (UsbMouseDevice
->IntEndpointDescriptor
);
586 if (UsbMouseDevice
->ControllerNameTable
) {
587 FreeUnicodeStringTable (UsbMouseDevice
->ControllerNameTable
);
590 gBS
->FreePool (UsbMouseDevice
);
598 Tell if a Usb Controller is a mouse
600 @param UsbIo Protocol instance pointer.
602 @retval TRUE It is a mouse
603 @retval FALSE It is not a mouse
608 IN EFI_USB_IO_PROTOCOL
*UsbIo
612 EFI_USB_INTERFACE_DESCRIPTOR InterfaceDescriptor
;
615 // Get the Default interface descriptor, now we only
616 // suppose it is interface 1
618 Status
= UsbIo
->UsbGetInterfaceDescriptor (
623 if (EFI_ERROR (Status
)) {
627 if ((InterfaceDescriptor
.InterfaceClass
== CLASS_HID
) &&
628 (InterfaceDescriptor
.InterfaceSubClass
== SUBCLASS_BOOT
) &&
629 (InterfaceDescriptor
.InterfaceProtocol
== PROTOCOL_MOUSE
)
639 Initialize the Usb Mouse Device.
641 @param UsbMouseDev Device instance to be initialized
643 @retval EFI_SUCCESS Success
644 @retval EFI_DEVICE_ERROR Init error. EFI_OUT_OF_RESOURCES- Can't allocate
650 InitializeUsbMouseDevice (
651 IN USB_MOUSE_DEV
*UsbMouseDev
654 EFI_USB_IO_PROTOCOL
*UsbIo
;
657 EFI_USB_HID_DESCRIPTOR MouseHidDesc
;
660 UsbIo
= UsbMouseDev
->UsbIo
;
663 // Get HID descriptor
665 Status
= UsbGetHidDescriptor (
667 UsbMouseDev
->InterfaceDescriptor
->InterfaceNumber
,
671 if (EFI_ERROR (Status
)) {
676 // Get Report descriptor
678 if (MouseHidDesc
.HidClassDesc
[0].DescriptorType
!= 0x22) {
679 return EFI_UNSUPPORTED
;
682 ReportDesc
= AllocateZeroPool (MouseHidDesc
.HidClassDesc
[0].DescriptorLength
);
683 if (ReportDesc
== NULL
) {
684 return EFI_OUT_OF_RESOURCES
;
687 Status
= UsbGetReportDescriptor (
689 UsbMouseDev
->InterfaceDescriptor
->InterfaceNumber
,
690 MouseHidDesc
.HidClassDesc
[0].DescriptorLength
,
694 if (EFI_ERROR (Status
)) {
695 gBS
->FreePool (ReportDesc
);
700 // Parse report descriptor
702 Status
= ParseMouseReportDescriptor (
705 MouseHidDesc
.HidClassDesc
[0].DescriptorLength
708 if (EFI_ERROR (Status
)) {
709 gBS
->FreePool (ReportDesc
);
713 if (UsbMouseDev
->NumberOfButtons
>= 1) {
714 UsbMouseDev
->Mode
.LeftButton
= TRUE
;
717 if (UsbMouseDev
->NumberOfButtons
> 1) {
718 UsbMouseDev
->Mode
.RightButton
= TRUE
;
721 UsbMouseDev
->Mode
.ResolutionX
= 8;
722 UsbMouseDev
->Mode
.ResolutionY
= 8;
723 UsbMouseDev
->Mode
.ResolutionZ
= 0;
725 // Here we just assume interface 0 is the mouse interface
727 UsbGetProtocolRequest (
733 if (Protocol
!= BOOT_PROTOCOL
) {
734 Status
= UsbSetProtocolRequest (
740 if (EFI_ERROR (Status
)) {
741 gBS
->FreePool (ReportDesc
);
742 return EFI_DEVICE_ERROR
;
747 // Set indefinite Idle rate for USB Mouse
756 gBS
->FreePool (ReportDesc
);
758 if (UsbMouseDev
->DelayedRecoveryEvent
) {
759 gBS
->CloseEvent (UsbMouseDev
->DelayedRecoveryEvent
);
760 UsbMouseDev
->DelayedRecoveryEvent
= 0;
763 Status
= gBS
->CreateEvent (
764 EVT_TIMER
| EVT_NOTIFY_SIGNAL
,
766 USBMouseRecoveryHandler
,
768 &UsbMouseDev
->DelayedRecoveryEvent
776 It is called whenever there is data received from async interrupt
779 @param Data Data received.
780 @param DataLength Length of Data
781 @param Context Passed in context
782 @param Result Async Interrupt Transfer result
785 @return EFI_DEVICE_ERROR
791 OnMouseInterruptComplete (
798 USB_MOUSE_DEV
*UsbMouseDevice
;
799 EFI_USB_IO_PROTOCOL
*UsbIo
;
803 UsbMouseDevice
= (USB_MOUSE_DEV
*) Context
;
804 UsbIo
= UsbMouseDevice
->UsbIo
;
806 if (Result
!= EFI_USB_NOERROR
) {
808 // Some errors happen during the process
810 MouseReportStatusCode (
811 UsbMouseDevice
->DevicePath
,
812 EFI_ERROR_CODE
| EFI_ERROR_MINOR
,
813 PcdGet32 (PcdStatusCodeValueMouseInputError
)
816 if ((Result
& EFI_USB_ERR_STALL
) == EFI_USB_ERR_STALL
) {
817 EndpointAddr
= UsbMouseDevice
->IntEndpointDescriptor
->EndpointAddress
;
819 UsbClearEndpointHalt (
826 UsbIo
->UsbAsyncInterruptTransfer (
828 UsbMouseDevice
->IntEndpointDescriptor
->EndpointAddress
,
837 UsbMouseDevice
->DelayedRecoveryEvent
,
839 EFI_USB_INTERRUPT_DELAY
841 return EFI_DEVICE_ERROR
;
844 if (DataLength
== 0 || Data
== NULL
) {
848 UsbMouseDevice
->StateChanged
= TRUE
;
853 UsbMouseDevice
->State
.LeftButton
= (BOOLEAN
) (*(UINT8
*) Data
& 0x01);
854 UsbMouseDevice
->State
.RightButton
= (BOOLEAN
) (*(UINT8
*) Data
& 0x02);
855 UsbMouseDevice
->State
.RelativeMovementX
+= *((INT8
*) Data
+ 1);
856 UsbMouseDevice
->State
.RelativeMovementY
+= *((INT8
*) Data
+ 2);
858 if (DataLength
> 3) {
859 UsbMouseDevice
->State
.RelativeMovementZ
+= *((INT8
*) Data
+ 3);
868 IN EFI_MOUSE_STATE *MouseState
871 Aprint("(%x: %x, %x)\n",
872 MouseState->ButtonStates,
880 Get the mouse state, see SIMPLE POINTER PROTOCOL.
882 @param This Protocol instance pointer.
883 @param MouseState Current mouse state
886 @return EFI_DEVICE_ERROR
887 @return EFI_NOT_READY
894 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
895 OUT EFI_SIMPLE_POINTER_STATE
*MouseState
898 USB_MOUSE_DEV
*MouseDev
;
900 if (MouseState
== NULL
) {
901 return EFI_DEVICE_ERROR
;
904 MouseDev
= USB_MOUSE_DEV_FROM_MOUSE_PROTOCOL (This
);
906 if (!MouseDev
->StateChanged
) {
907 return EFI_NOT_READY
;
913 sizeof (EFI_SIMPLE_POINTER_STATE
)
917 // Clear previous move state
919 MouseDev
->State
.RelativeMovementX
= 0;
920 MouseDev
->State
.RelativeMovementY
= 0;
921 MouseDev
->State
.RelativeMovementZ
= 0;
923 MouseDev
->StateChanged
= FALSE
;
930 Reset the mouse device, see SIMPLE POINTER PROTOCOL.
932 @param This Protocol instance pointer.
933 @param ExtendedVerification Ignored here/
942 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
943 IN BOOLEAN ExtendedVerification
946 USB_MOUSE_DEV
*UsbMouseDevice
;
947 EFI_USB_IO_PROTOCOL
*UsbIo
;
949 UsbMouseDevice
= USB_MOUSE_DEV_FROM_MOUSE_PROTOCOL (This
);
951 UsbIo
= UsbMouseDevice
->UsbIo
;
953 MouseReportStatusCode (
954 UsbMouseDevice
->DevicePath
,
956 PcdGet32 (PcdStatusCodeValueMouseReset
)
961 &UsbMouseDevice
->State
,
962 sizeof (EFI_SIMPLE_POINTER_STATE
)
964 UsbMouseDevice
->StateChanged
= FALSE
;
971 Event notification function for SIMPLE_POINTER.WaitForInput event
972 Signal the event if there is input from mouse
974 @param Event Wait Event
975 @param Context Passed parameter to event handler
982 UsbMouseWaitForInput (
987 USB_MOUSE_DEV
*UsbMouseDev
;
989 UsbMouseDev
= (USB_MOUSE_DEV
*) Context
;
992 // Someone is waiting on the mouse event, if there's
993 // input from mouse, signal the event
995 if (UsbMouseDev
->StateChanged
) {
996 gBS
->SignalEvent (Event
);
1002 Timer handler for Delayed Recovery timer.
1004 @param Event The Delayed Recovery event.
1005 @param Context Points to the USB_KB_DEV instance.
1011 USBMouseRecoveryHandler (
1016 USB_MOUSE_DEV
*UsbMouseDev
;
1017 EFI_USB_IO_PROTOCOL
*UsbIo
;
1019 UsbMouseDev
= (USB_MOUSE_DEV
*) Context
;
1021 UsbIo
= UsbMouseDev
->UsbIo
;
1023 UsbIo
->UsbAsyncInterruptTransfer (
1025 UsbMouseDev
->IntEndpointDescriptor
->EndpointAddress
,
1027 UsbMouseDev
->IntEndpointDescriptor
->Interval
,
1028 UsbMouseDev
->IntEndpointDescriptor
->MaxPacketSize
,
1029 OnMouseInterruptComplete
,
1036 Report Status Code in Usb Bot Driver
1038 @param DevicePath Use this to get Device Path
1039 @param CodeType Status Code Type
1040 @param CodeValue Status Code Value
1046 MouseReportStatusCode (
1047 IN EFI_DEVICE_PATH_PROTOCOL
*DevicePath
,
1048 IN EFI_STATUS_CODE_TYPE CodeType
,
1049 IN EFI_STATUS_CODE_VALUE Value
1052 REPORT_STATUS_CODE_WITH_DEVICE_PATH (