summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2008-07-25 06:55:07 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2008-07-25 06:55:07 +0000
commitbb80e3b213f1d9409cd97a63e4d40191ce502912 (patch)
treeaaea2fa3f74781a33ee56f7ed6736538470b5ec9
parent4ad4145108dcbb4cc3db84844cd0d2bec9f1cc3b (diff)
downloadedk2-bb80e3b213f1d9409cd97a63e4d40191ce502912.tar.gz
edk2-bb80e3b213f1d9409cd97a63e4d40191ce502912.tar.bz2
edk2-bb80e3b213f1d9409cd97a63e4d40191ce502912.zip
modify coding style to pass ecc tool
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5563 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Bus/Usb/UsbMouseDxe/ComponentName.c11
-rw-r--r--MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c88
-rw-r--r--MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.h26
-rw-r--r--MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c259
-rw-r--r--MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.h35
5 files changed, 239 insertions, 180 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/ComponentName.c b/MdeModulePkg/Bus/Usb/UsbMouseDxe/ComponentName.c
index 933c9dd695..b0704f7d7e 100644
--- a/MdeModulePkg/Bus/Usb/UsbMouseDxe/ComponentName.c
+++ b/MdeModulePkg/Bus/Usb/UsbMouseDxe/ComponentName.c
@@ -1,6 +1,8 @@
/** @file
-Copyright (c) 2004 - 2007, Intel Corporation
+ UEFI Component Name(2) protocol implementation for Usb Mouse driver.
+
+Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -9,13 +11,6 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-Module Name:
-
- ComponentName.c
-
-Abstract:
-
-
**/
#include "UsbMouse.h"
diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c b/MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c
index e7b67df7cf..212fbf89d2 100644
--- a/MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c
+++ b/MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c
@@ -1,6 +1,8 @@
/** @file
-Copyright (c) 2004, Intel Corporation
+ Parse mouse hid descriptor.
+
+Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -9,34 +11,21 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-Module Name:
-
- Mousehid.c
-
-Abstract:
- Parse mouse hid descriptor
-
-
**/
#include "MouseHid.h"
-//
-// Get an item from report descriptor
-//
-
/**
- Get Next Item
+ Get next item from report descriptor.
- @param StartPos Start Position
- @param EndPos End Position
- @param HidItem HidItem to return
+ @param StartPos Start Position.
+ @param EndPos End Position.
+ @param HidItem HidItem to return.
- @return Position
+ @return Position.
**/
-STATIC
UINT8 *
GetNextItem (
IN UINT8 *StartPos,
@@ -129,14 +118,13 @@ GetNextItem (
/**
- Get Item Data
+ Get item data from report descriptor.
- @param HidItem HID_ITEM
+ @param HidItem The pointer to HID_ITEM.
- @return HidItem Data
+ @return The Data of HidItem.
**/
-STATIC
UINT32
GetItemData (
IN HID_ITEM *HidItem
@@ -162,14 +150,12 @@ GetItemData (
/**
- Parse Local Item
-
- @param UsbMouse USB_MOUSE_DEV
- @param LocalItem Local Item
+ Parse local item from report descriptor.
+ @param UsbMouse The instance of USB_MOUSE_DEV
+ @param LocalItem The pointer to local hid item
**/
-STATIC
VOID
ParseLocalItem (
IN USB_MOUSE_DEV *UsbMouse,
@@ -216,7 +202,14 @@ ParseLocalItem (
}
}
-STATIC
+
+/**
+ Parse global item from report descriptor.
+
+ @param UsbMouse The instance of USB_MOUSE_DEV
+ @param GlobalItem The pointer to global hid item
+
+**/
VOID
ParseGlobalItem (
IN USB_MOUSE_DEV *UsbMouse,
@@ -247,17 +240,13 @@ ParseGlobalItem (
}
-
/**
- Parse Main Item
-
- @param UsbMouse TODO: add argument description
- @param MainItem HID_ITEM to parse
+ Parse main item from report descriptor.
- @return VOID
+ @param UsbMouse The instance of USB_MOUSE_DEV
+ @param MainItem Main hid item to parse
**/
-STATIC
VOID
ParseMainItem (
IN USB_MOUSE_DEV *UsbMouse,
@@ -272,15 +261,12 @@ ParseMainItem (
/**
- Parse Hid Item
+ Parse hid item from report descriptor.
- @param UsbMouse USB_MOUSE_DEV
- @param HidItem HidItem to parse
-
- @return VOID
+ @param UsbMouse The instance of USB_MOUSE_DEV
+ @param HidItem The hid item to parse
**/
-STATIC
VOID
ParseHidItem (
IN USB_MOUSE_DEV *UsbMouse,
@@ -311,19 +297,17 @@ ParseHidItem (
break;
}
}
-//
-// A simple parse just read some field we are interested in
-//
+
/**
- Parse Mouse Report Descriptor
+ Parse Mouse Report Descriptor.
- @param UsbMouse USB_MOUSE_DEV
+ @param UsbMouse The instance of USB_MOUSE_DEV
@param ReportDescriptor Report descriptor to parse
@param ReportSize Report descriptor size
@retval EFI_DEVICE_ERROR Report descriptor error
- @retval EFI_SUCCESS Success
+ @retval EFI_SUCCESS Parse descriptor success
**/
EFI_STATUS
@@ -334,14 +318,14 @@ ParseMouseReportDescriptor (
)
{
UINT8 *DescriptorEnd;
- UINT8 *ptr;
+ UINT8 *Ptr;
HID_ITEM HidItem;
DescriptorEnd = ReportDescriptor + ReportSize;
- ptr = GetNextItem (ReportDescriptor, DescriptorEnd, &HidItem);
+ Ptr = GetNextItem (ReportDescriptor, DescriptorEnd, &HidItem);
- while (ptr != NULL) {
+ while (Ptr != NULL) {
if (HidItem.Format != HID_ITEM_FORMAT_SHORT) {
//
// Long Format Item is not supported at current HID revision
@@ -351,7 +335,7 @@ ParseMouseReportDescriptor (
ParseHidItem (UsbMouse, &HidItem);
- ptr = GetNextItem (ptr, DescriptorEnd, &HidItem);
+ Ptr = GetNextItem (Ptr, DescriptorEnd, &HidItem);
}
UsbMouse->NumberOfButtons = (UINT8) (UsbMouse->PrivateData.ButtonMaxIndex - UsbMouse->PrivateData.ButtonMinIndex + 1);
diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.h b/MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.h
index 80211341a2..478bccffe9 100644
--- a/MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.h
+++ b/MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.h
@@ -1,6 +1,8 @@
/** @file
-Copyright (c) 2004, Intel Corporation
+ The interface of HID data structure.
+
+Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -9,17 +11,10 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-Module Name:
-
- MouseHid.h
-
-Abstract:
-
-
**/
-#ifndef __MOUSE_HID_H
-#define __MOUSE_HID_H
+#ifndef _EFI_MOUSE_HID_H_
+#define _EFI_MOUSE_HID_H_
#include "UsbMouse.h"
@@ -75,6 +70,17 @@ typedef struct {
UINT32 CollectionStackPtr;
} HID_PARSER;
+/**
+ Parse Mouse Report Descriptor.
+
+ @param UsbMouse The instance of USB_MOUSE_DEV
+ @param ReportDescriptor Report descriptor to parse
+ @param ReportSize Report descriptor size
+
+ @retval EFI_DEVICE_ERROR Report descriptor error
+ @retval EFI_SUCCESS Parse descriptor success
+
+**/
EFI_STATUS
ParseMouseReportDescriptor (
IN USB_MOUSE_DEV *UsbMouse,
diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c
index 378bbec7ed..1e359d7543 100644
--- a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c
+++ b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c
@@ -1,6 +1,8 @@
/** @file
-Copyright (c) 2004 - 2007, Intel Corporation
+ Usb Mouse Driver Binding and Implement SIMPLE_POINTER_PROTOCOL Protocol.
+
+Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -9,13 +11,6 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- Module Name:
-
- UsbMouse.c
-
- Abstract:
-
-
**/
#include "UsbMouse.h"
@@ -27,10 +22,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "UsbMouse.h"
#include "MouseHid.h"
-//
-// Prototypes
-// Driver model protocol interface
-//
+/**
+ The USB Mouse driver entry pointer.
+
+ @param ImageHandle The driver image handle.
+ @param SystemTable The system table.
+
+ @return EFI_SUCCESS The component name protocol is installed.
+ @return Others Failed to init the usb driver.
+
+**/
EFI_STATUS
EFIAPI
USBMouseDriverBindingEntryPoint (
@@ -38,6 +39,18 @@ USBMouseDriverBindingEntryPoint (
IN EFI_SYSTEM_TABLE *SystemTable
);
+/**
+ Test to see if this driver supports ControllerHandle. Any ControllerHandle
+ that has UsbIoProtocol installed will be supported.
+
+ @param This Protocol instance pointer.
+ @param Controller Handle of device to test.
+ @param RemainingDevicePath Not used.
+
+ @retval EFI_SUCCESS This driver supports this device.
+ @retval EFI_UNSUPPORTED This driver does not support this device.
+
+**/
EFI_STATUS
EFIAPI
USBMouseDriverBindingSupported (
@@ -46,6 +59,20 @@ USBMouseDriverBindingSupported (
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
+/**
+ Starting the Usb Mouse Driver.
+
+ @param This Protocol instance pointer.
+ @param Controller Handle of device to test
+ @param RemainingDevicePath Not used
+
+ @retval EFI_SUCCESS This driver supports this device.
+ @retval EFI_UNSUPPORTED This driver does not support this device.
+ @retval EFI_DEVICE_ERROR This driver cannot be started due to device Error.
+ @retval EFI_OUT_OF_RESOURCES Can't allocate memory resources.
+ @retval EFI_ALREADY_STARTED Thios driver has been started.
+
+**/
EFI_STATUS
EFIAPI
USBMouseDriverBindingStart (
@@ -54,6 +81,19 @@ USBMouseDriverBindingStart (
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
+/**
+ Stop this driver on ControllerHandle. Support stoping any child handles
+ created by this driver.
+
+ @param This Protocol instance pointer.
+ @param Controller Handle of device to stop driver on.
+ @param NumberOfChildren Number of Children in the ChildHandleBuffer.
+ @param ChildHandleBuffer List of handles for the children we need to stop.
+
+ @retval EFI_SUCCESS The controller or children are stopped.
+ @retval Other Failed to stop the driver.
+
+**/
EFI_STATUS
EFIAPI
USBMouseDriverBindingStop (
@@ -76,22 +116,43 @@ EFI_DRIVER_BINDING_PROTOCOL gUsbMouseDriverBinding = {
NULL
};
-//
-// helper functions
-//
-STATIC
+/**
+ Tell if a Usb Controller is a mouse.
+
+ @param UsbIo Protocol instance pointer.
+
+ @retval TRUE It is a mouse.
+ @retval FALSE It is not a mouse.
+
+**/
BOOLEAN
IsUsbMouse (
IN EFI_USB_IO_PROTOCOL *UsbIo
);
-STATIC
+/**
+ Initialize the Usb Mouse Device.
+
+ @param UsbMouseDev Device instance to be initialized.
+
+ @retval EFI_SUCCESS Success.
+ @retval EFI_OUT_OF_RESOURCES Can't allocate memory.
+ @retval Other Init error.
+
+**/
EFI_STATUS
InitializeUsbMouseDevice (
IN USB_MOUSE_DEV *UsbMouseDev
);
-STATIC
+/**
+ Event notification function for SIMPLE_POINTER.WaitForInput event
+ Signal the event if there is input from mouse.
+
+ @param Event Wait Event.
+ @param Context Passed parameter to event handler.
+
+**/
VOID
EFIAPI
UsbMouseWaitForInput (
@@ -99,10 +160,19 @@ UsbMouseWaitForInput (
IN VOID *Context
);
-//
-// Mouse interrupt handler
-//
-STATIC
+/**
+ It is called whenever there is data received from async interrupt
+ transfer.
+
+ @param Data Data received.
+ @param DataLength Length of Data.
+ @param Context Passed in context.
+ @param Result Async Interrupt Transfer result.
+
+ @return EFI_SUCCESS Receive data successfully.
+ @return EFI_DEVICE_ERROR USB async interrupt transfer fails.
+
+**/
EFI_STATUS
EFIAPI
OnMouseInterruptComplete (
@@ -112,10 +182,17 @@ OnMouseInterruptComplete (
IN UINT32 Result
);
-//
-// Mouse Protocol
-//
-STATIC
+/**
+ Get the mouse state, see SIMPLE POINTER PROTOCOL.
+
+ @param This Protocol instance pointer.
+ @param MouseState Current mouse state.
+
+ @return EFI_SUCCESS Get usb mouse status successfully.
+ @return EFI_DEVICE_ERROR The parameter is error.
+ @return EFI_NOT_READY Mouse status doesn't change.
+
+**/
EFI_STATUS
EFIAPI
GetMouseState (
@@ -123,7 +200,15 @@ GetMouseState (
OUT EFI_SIMPLE_POINTER_STATE *MouseState
);
-STATIC
+/**
+ Reset the mouse device, see SIMPLE POINTER PROTOCOL.
+
+ @param This Protocol instance pointer.
+ @param ExtendedVerification Ignored here.
+
+ @return EFI_SUCCESS Reset usb mouse successfully.
+
+**/
EFI_STATUS
EFIAPI
UsbMouseReset (
@@ -131,28 +216,23 @@ UsbMouseReset (
IN BOOLEAN ExtendedVerification
);
-//
-// Driver start here
-//
+
+/**
+ The USB Mouse driver entry pointer.
+
+ @param ImageHandle The driver image handle.
+ @param SystemTable The system table.
+
+ @return EFI_SUCCESS The component name protocol is installed.
+ @return Others Failed to init the usb driver.
+
+**/
EFI_STATUS
EFIAPI
USBMouseDriverBindingEntryPoint (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
-/*++
-
- Routine Description:
- Entry point for EFI drivers.
-
- Arguments:
- ImageHandle - EFI_HANDLE
- SystemTable - EFI_SYSTEM_TABLE
- Returns:
- EFI_SUCCESS
- others
-
---*/
{
return EfiLibInstallDriverBindingComponentName2 (
ImageHandle,
@@ -167,11 +247,11 @@ USBMouseDriverBindingEntryPoint (
/**
Test to see if this driver supports ControllerHandle. Any ControllerHandle
- that has UsbHcProtocol installed will be supported.
+ that has UsbIoProtocol installed will be supported.
@param This Protocol instance pointer.
@param Controller Handle of device to test
- @param RemainingDevicePath Not used
+ @param RemainingDevicePath Not used.
@retval EFI_SUCCESS This driver supports this device.
@retval EFI_UNSUPPORTED This driver does not support this device.
@@ -225,18 +305,17 @@ USBMouseDriverBindingSupported (
/**
- Starting the Usb Bus Driver
+ Starting the Usb Mouse Driver.
@param This Protocol instance pointer.
- @param Controller Handle of device to test
- @param RemainingDevicePath Not used
+ @param Controller Handle of device to test.
+ @param RemainingDevicePath Not used.
@retval EFI_SUCCESS This driver supports this device.
@retval EFI_UNSUPPORTED This driver does not support this device.
- @retval EFI_DEVICE_ERROR This driver cannot be started due to device Error
- EFI_OUT_OF_RESOURCES- Can't allocate memory
- resources
- @retval EFI_ALREADY_STARTED Thios driver has been started
+ @retval EFI_DEVICE_ERROR This driver cannot be started due to device Error.
+ @retval EFI_OUT_OF_RESOURCES Can't allocate memory resources.
+ @retval EFI_ALREADY_STARTED Thios driver has been started.
**/
EFI_STATUS
@@ -477,13 +556,12 @@ ErrorExit:
created by this driver.
@param This Protocol instance pointer.
- @param Controller Handle of device to stop driver on
- @param NumberOfChildren Number of Children in the ChildHandleBuffer
+ @param Controller Handle of device to stop driver on.
+ @param NumberOfChildren Number of Children in the ChildHandleBuffer.
@param ChildHandleBuffer List of handles for the children we need to stop.
- @return EFI_SUCCESS
- @return EFI_DEVICE_ERROR
- @return others
+ @retval EFI_SUCCESS The controller or children are stopped.
+ @retval Other Failed to stop the driver.
**/
EFI_STATUS
@@ -552,7 +630,7 @@ USBMouseDriverBindingStop (
gBS->CloseEvent (UsbMouseDevice->SimplePointerProtocol.WaitForInput);
- if (UsbMouseDevice->DelayedRecoveryEvent) {
+ if (UsbMouseDevice->DelayedRecoveryEvent != NULL) {
gBS->CloseEvent (UsbMouseDevice->DelayedRecoveryEvent);
UsbMouseDevice->DelayedRecoveryEvent = 0;
}
@@ -576,7 +654,7 @@ USBMouseDriverBindingStop (
gBS->FreePool (UsbMouseDevice->InterfaceDescriptor);
gBS->FreePool (UsbMouseDevice->IntEndpointDescriptor);
- if (UsbMouseDevice->ControllerNameTable) {
+ if (UsbMouseDevice->ControllerNameTable != NULL) {
FreeUnicodeStringTable (UsbMouseDevice->ControllerNameTable);
}
@@ -588,12 +666,12 @@ USBMouseDriverBindingStop (
/**
- Tell if a Usb Controller is a mouse
+ Tell if a Usb Controller is a mouse.
@param UsbIo Protocol instance pointer.
- @retval TRUE It is a mouse
- @retval FALSE It is not a mouse
+ @retval TRUE It is a mouse.
+ @retval FALSE It is not a mouse.
**/
BOOLEAN
@@ -631,14 +709,13 @@ IsUsbMouse (
/**
Initialize the Usb Mouse Device.
- @param UsbMouseDev Device instance to be initialized
+ @param UsbMouseDev Device instance to be initialized.
- @retval EFI_SUCCESS Success
- @retval EFI_DEVICE_ERROR Init error. EFI_OUT_OF_RESOURCES- Can't allocate
- memory
+ @retval EFI_SUCCESS Success.
+ @retval EFI_OUT_OF_RESOURCES Can't allocate memory.
+ @retval Other Init error.
**/
-STATIC
EFI_STATUS
InitializeUsbMouseDevice (
IN USB_MOUSE_DEV *UsbMouseDev
@@ -748,7 +825,7 @@ InitializeUsbMouseDevice (
gBS->FreePool (ReportDesc);
- if (UsbMouseDev->DelayedRecoveryEvent) {
+ if (UsbMouseDev->DelayedRecoveryEvent != NULL) {
gBS->CloseEvent (UsbMouseDev->DelayedRecoveryEvent);
UsbMouseDev->DelayedRecoveryEvent = 0;
}
@@ -770,15 +847,14 @@ InitializeUsbMouseDevice (
transfer.
@param Data Data received.
- @param DataLength Length of Data
- @param Context Passed in context
- @param Result Async Interrupt Transfer result
+ @param DataLength Length of Data.
+ @param Context Passed in context.
+ @param Result Async Interrupt Transfer result.
- @return EFI_SUCCESS
- @return EFI_DEVICE_ERROR
+ @return EFI_SUCCESS Receive data successfully.
+ @return EFI_DEVICE_ERROR USB async interrupt transfer fails.
**/
-STATIC
EFI_STATUS
EFIAPI
OnMouseInterruptComplete (
@@ -855,32 +931,18 @@ OnMouseInterruptComplete (
return EFI_SUCCESS;
}
-/*
-STATIC VOID
-PrintMouseState(
- IN EFI_MOUSE_STATE *MouseState
- )
-{
- Aprint("(%x: %x, %x)\n",
- MouseState->ButtonStates,
- MouseState->dx,
- MouseState->dy
- );
-}
-*/
/**
Get the mouse state, see SIMPLE POINTER PROTOCOL.
@param This Protocol instance pointer.
- @param MouseState Current mouse state
+ @param MouseState Current mouse state.
- @return EFI_SUCCESS
- @return EFI_DEVICE_ERROR
- @return EFI_NOT_READY
+ @return EFI_SUCCESS Get usb mouse status successfully.
+ @return EFI_DEVICE_ERROR The parameter is error.
+ @return EFI_NOT_READY Mouse status doesn't change.
**/
-STATIC
EFI_STATUS
EFIAPI
GetMouseState (
@@ -923,12 +985,11 @@ GetMouseState (
Reset the mouse device, see SIMPLE POINTER PROTOCOL.
@param This Protocol instance pointer.
- @param ExtendedVerification Ignored here/
+ @param ExtendedVerification Ignored here.
- @return EFI_SUCCESS
+ @return EFI_SUCCESS Reset usb mouse successfully.
**/
-STATIC
EFI_STATUS
EFIAPI
UsbMouseReset (
@@ -959,14 +1020,12 @@ UsbMouseReset (
/**
Event notification function for SIMPLE_POINTER.WaitForInput event
- Signal the event if there is input from mouse
+ Signal the event if there is input from mouse.
@param Event Wait Event
@param Context Passed parameter to event handler
- VOID
-
+
**/
-STATIC
VOID
EFIAPI
UsbMouseWaitForInput (
@@ -1023,7 +1082,7 @@ USBMouseRecoveryHandler (
/**
- Report Status Code in Usb Bot Driver
+ Report Status Code in Usb Bot Driver.
@param DevicePath Use this to get Device Path
@param CodeType Status Code Type
diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.h b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.h
index cb8cc03ea1..0e4c56621a 100644
--- a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.h
+++ b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.h
@@ -1,6 +1,8 @@
/** @file
-Copyright (c) 2004 - 2007, Intel Corporation
+ Helper routine and corrsponding data struct used by USB Mouse Driver.
+
+Copyright (c) 2004 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -9,17 +11,10 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- Module Name:
-
- UsbMouse.h
-
- Abstract:
-
-
**/
-#ifndef _USB_MOUSE_H
-#define _USB_MOUSE_H
+#ifndef _EFI_USB_MOUSE_H_
+#define _EFI_USB_MOUSE_H_
#include <PiDxe.h>
@@ -78,6 +73,15 @@ typedef struct {
#define USB_MOUSE_DEV_FROM_MOUSE_PROTOCOL(a) \
CR(a, USB_MOUSE_DEV, SimplePointerProtocol, USB_MOUSE_DEV_SIGNATURE)
+
+/**
+ Timer handler for Delayed Recovery timer.
+
+ @param Event The Delayed Recovery event.
+ @param Context Points to the USB_KB_DEV instance.
+
+
+**/
VOID
EFIAPI
USBMouseRecoveryHandler (
@@ -93,6 +97,17 @@ extern EFI_COMPONENT_NAME_PROTOCOL gUsbMouseComponentName;
extern EFI_COMPONENT_NAME2_PROTOCOL gUsbMouseComponentName2;
extern EFI_GUID gEfiUsbMouseDriverGuid;
+
+/**
+ Report Status Code in Usb Bot Driver.
+
+ @param DevicePath Use this to get Device Path
+ @param CodeType Status Code Type
+ @param CodeValue Status Code Value
+
+ @return None
+
+**/
VOID
MouseReportStatusCode (
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,