USB Mouse Driver that manages USB mouse and produces Absolute Pointer Protocol.\r
\r
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
-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
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
/**\r
Starts the mouse device with this driver.\r
\r
- This function consumes USB I/O Portocol, intializes USB mouse device,\r
+ This function consumes USB I/O Protocol, initializes USB mouse device,\r
installs Absolute Pointer Protocol, and submits Asynchronous Interrupt\r
Transfer to manage the USB mouse device.\r
\r
EndpointNumber = UsbMouseAbsolutePointerDevice->InterfaceDescriptor.NumEndpoints;\r
\r
//\r
- // Traverse endpoints to find interrupt endpoint\r
+ // Traverse endpoints to find interrupt endpoint IN\r
//\r
Found = FALSE;\r
for (Index = 0; Index < EndpointNumber; Index++) {\r
&EndpointDescriptor\r
);\r
\r
- if ((EndpointDescriptor.Attributes & (BIT0 | BIT1)) == USB_ENDPOINT_INTERRUPT) {\r
+ if (((EndpointDescriptor.Attributes & (BIT0 | BIT1)) == USB_ENDPOINT_INTERRUPT) &&\r
+ ((EndpointDescriptor.EndpointAddress & USB_ENDPOINT_DIR_IN) != 0)) {\r
//\r
// We only care interrupt endpoint here\r
//\r