/** @file\r
Helper routine and corresponding data struct used by USB Mouse Driver.\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation\r
+Copyright (c) 2004 - 2010, Intel Corporation\r
All rights reserved. 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
///\r
/// General HID Item structure\r
///\r
+\r
+typedef union {\r
+ UINT8 U8;\r
+ UINT16 U16;\r
+ UINT32 U32;\r
+ INT8 I8;\r
+ INT16 I16;\r
+ INT32 I32;\r
+ UINT8 *LongData;\r
+} HID_DATA;\r
+\r
typedef struct {\r
- UINT16 Format;\r
- UINT8 Size;\r
- UINT8 Type;\r
- UINT8 Tag;\r
- union {\r
- UINT8 U8;\r
- UINT16 U16;\r
- UINT32 U32;\r
- INT8 I8;\r
- INT16 I16;\r
- INT32 I32;\r
- UINT8 *LongData;\r
- } Data;\r
+ UINT16 Format;\r
+ UINT8 Size;\r
+ UINT8 Type;\r
+ UINT8 Tag;\r
+ HID_DATA Data;\r
} HID_ITEM;\r
\r
#define USB_MOUSE_DEV_FROM_MOUSE_PROTOCOL(a) \\r
languages specified in SupportedLanguages. The\r
number of languages supported by a driver is up\r
to the driver writer. Language is specified\r
- in RFC 3066 or ISO 639-2 language code format.\r
+ in RFC 4646 or ISO 639-2 language code format.\r
@param DriverName A pointer to the Unicode string to return.\r
This Unicode string is the name of the\r
driver specified by This in the language\r
languages specified in SupportedLanguages. The\r
number of languages supported by a driver is up\r
to the driver writer. Language is specified in\r
- RFC 3066 or ISO 639-2 language code format.\r
+ RFC 4646 or ISO 639-2 language code format.\r
@param ControllerName A pointer to the Unicode string to return.\r
This Unicode string is the name of the\r
controller specified by ControllerHandle and\r
OUT CHAR16 **ControllerName\r
);\r
\r
+//\r
+// Functions of EFI_SIMPLE_POINTER_PROTOCOL\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
+ @param MouseState A pointer to the state information on the pointer device.\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
+ @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
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+GetMouseState (\r
+ IN EFI_SIMPLE_POINTER_PROTOCOL *This,\r
+ OUT EFI_SIMPLE_POINTER_STATE *MouseState\r
+ );\r
+\r
+/** \r
+ Resets the pointer device hardware.\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
+ @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
+EFI_STATUS\r
+EFIAPI\r
+UsbMouseReset (\r
+ IN EFI_SIMPLE_POINTER_PROTOCOL *This,\r
+ IN BOOLEAN ExtendedVerification\r
+ );\r
+\r
+/**\r
+ Event notification function for SIMPLE_POINTER.WaitForInput event.\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
+VOID\r
+EFIAPI\r
+UsbMouseWaitForInput (\r
+ IN EFI_EVENT Event,\r
+ IN VOID *Context\r
+ );\r
+\r
//\r
// Internal worker functions\r
//\r
IN UINT32 Result\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
- @param MouseState A pointer to the state information on the pointer device.\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
- @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
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-GetMouseState (\r
- IN EFI_SIMPLE_POINTER_PROTOCOL *This,\r
- OUT EFI_SIMPLE_POINTER_STATE *MouseState\r
- );\r
-\r
-/** \r
- Resets the pointer device hardware.\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
- @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
-EFI_STATUS\r
-EFIAPI\r
-UsbMouseReset (\r
- IN EFI_SIMPLE_POINTER_PROTOCOL *This,\r
- IN BOOLEAN ExtendedVerification\r
- );\r
-\r
-/**\r
- Event notification function for SIMPLE_POINTER.WaitForInput event.\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
-VOID\r
-EFIAPI\r
-UsbMouseWaitForInput (\r
- IN EFI_EVENT Event,\r
- IN VOID *Context\r
- );\r
-\r
/**\r
Handler for Delayed Recovery event.\r
\r