/** @file\r
Helper routine and corresponding data struct used by USB Mouse Driver.\r
\r
-Copyright (c) 2004 - 2011, 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
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
\r
#define USB_MOUSE_DEV_SIGNATURE SIGNATURE_32 ('u', 'm', 'o', 'u')\r
\r
+//\r
+// A common header for usb standard descriptor.\r
+// Each stand descriptor has a length and type.\r
+//\r
+#pragma pack(1)\r
+typedef struct {\r
+ UINT8 Len;\r
+ UINT8 Type;\r
+} USB_DESC_HEAD;\r
+#pragma pack()\r
+\r
///\r
/// Button range and status\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 Simple Pointer Protocol, and submits Asynchronous Interrupt\r
Transfer to manage the USB mouse device.\r
\r
\r
/**\r
Retrieves the current state of a pointer device.\r
- \r
- @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL instance. \r
+\r
+ @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL instance.\r
@param MouseState A pointer to the state information on the pointer device.\r
- \r
+\r
@retval EFI_SUCCESS The state of the pointer device was returned in State.\r
@retval EFI_NOT_READY The state of the pointer device has not changed since the last call to\r
- GetState(). \r
+ GetState().\r
@retval EFI_DEVICE_ERROR A device error occurred while attempting to retrieve the pointer device's\r
- current state. \r
- @retval EFI_INVALID_PARAMETER MouseState is NULL. \r
+ current state.\r
+ @retval EFI_INVALID_PARAMETER MouseState is NULL.\r
\r
**/\r
EFI_STATUS\r
OUT EFI_SIMPLE_POINTER_STATE *MouseState\r
);\r
\r
-/** \r
+/**\r
Resets the pointer device hardware.\r
- \r
+\r
@param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL instance.\r
@param ExtendedVerification Indicates that the driver may perform a more exhaustive\r
verification operation of the device during reset.\r
- \r
+\r
@retval EFI_SUCCESS The device was reset.\r
@retval EFI_DEVICE_ERROR The device is not functioning correctly and could not be reset.\r
\r
\r
@param Event Event to be signaled when there's input from mouse.\r
@param Context Points to USB_MOUSE_DEV instance.\r
- \r
+\r
**/\r
VOID\r
EFIAPI\r