Coding style modification.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5058 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
klu2
2008-04-14 03:12:57 +00:00
parent e1a09a0eaa
commit bcd7041487
61 changed files with 3405 additions and 4718 deletions

View File

@ -28,6 +28,20 @@ EFI_DRIVER_BINDING_PROTOCOL gPS2MouseAbsolutePointerDriver = {
NULL
};
/**
Test to see if this driver supports ControllerHandle. Any ControllerHandle
than contains a IsaIo protocol can be supported.
@param This Protocol instance pointer.
@param ControllerHandle Handle of device to test
@param RemainingDevicePath Optional parameter use to pick a specific child
device to start.
@retval EFI_SUCCESS This driver supports this device
@retval EFI_ALREADY_STARTED This driver is already running on this device
@retval other This driver does not support this device
**/
EFI_STATUS
EFIAPI
PS2MouseAbsolutePointerDriverSupported (
@ -35,20 +49,6 @@ PS2MouseAbsolutePointerDriverSupported (
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
/*++
Routine Description:
ControllerDriver Protocol Method
Arguments:
Returns:
--*/
// GC_TODO: This - add argument and description to function comment
// GC_TODO: Controller - add argument and description to function comment
// GC_TODO: RemainingDevicePath - add argument and description to function comment
{
EFI_STATUS Status;
EFI_ISA_IO_PROTOCOL *IsaIo;
@ -108,6 +108,21 @@ Returns:
return Status;
}
/**
Start this driver on ControllerHandle by opening a IsaIo
protocol, creating PS2_MOUSE_ABSOLUTE_POINTER_DEV device and install gEfiAbsolutePointerProtocolGuid
finnally.
@param This Protocol instance pointer.
@param ControllerHandle Handle of device to bind driver to
@param RemainingDevicePath Optional parameter use to pick a specific child
device to start.
@retval EFI_SUCCESS This driver is added to ControllerHandle
@retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle
@retval other This driver does not support this device
**/
EFI_STATUS
EFIAPI
PS2MouseAbsolutePointerDriverStart (
@ -115,21 +130,6 @@ PS2MouseAbsolutePointerDriverStart (
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
/*++
Routine Description:
Start protocol interfaces for the mouse device handles.
Arguments:
This - Protocol instance pointer.
Controller - Handle of device to bind driver to.
RemainingDevicePath - Not used.
Returns:
EFI_SUCCESS - This driver is added to DeviceHandle.
other - Errors occurred.
--*/
{
EFI_STATUS Status;
EFI_STATUS EmptyStatus;
@ -385,6 +385,20 @@ ErrorExit:
return Status;
}
/**
Stop this driver on ControllerHandle. Support stoping any child handles
created by this driver.
@param This Protocol instance pointer.
@param ControllerHandle Handle of device to stop driver on
@param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
children is zero stop the entire bus driver.
@param ChildHandleBuffer List of Child Handles to Stop.
@retval EFI_SUCCESS This driver is removed ControllerHandle
@retval other This driver was not removed from this device
**/
EFI_STATUS
EFIAPI
PS2MouseAbsolutePointerDriverStop (
@ -393,21 +407,6 @@ PS2MouseAbsolutePointerDriverStop (
IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
)
/*++
Routine Description:
Arguments:
Returns:
--*/
// GC_TODO: This - add argument and description to function comment
// GC_TODO: Controller - add argument and description to function comment
// GC_TODO: NumberOfChildren - add argument and description to function comment
// GC_TODO: ChildHandleBuffer - add argument and description to function comment
// GC_TODO: EFI_SUCCESS - add return value to function comment
// GC_TODO: EFI_SUCCESS - add return value to function comment
{
EFI_STATUS Status;
EFI_ABSOLUTE_POINTER_PROTOCOL *AbsolutePointerProtocol;
@ -486,29 +485,23 @@ PS2MouseAbsolutePointerDriverStop (
return EFI_SUCCESS;
}
/**
Reset the Mouse and do BAT test for it, if ExtendedVerification isTRUE and there is a mouse device connectted to system
@param This - Pointer of simple pointer Protocol.
@param ExtendedVerification - Whether configure mouse parameters. True: do; FALSE: skip.
@retval EFI_SUCCESS - The command byte is written successfully.
@retval EFI_DEVICE_ERROR - Errors occurred during reseting keyboard.
**/
EFI_STATUS
EFIAPI
MouseAbsolutePointerReset (
IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
)
/*++
Routine Description:
Reset the Mouse and do BAT test for it, if ExtendedVerification isTRUE and there is a mouse device connectted to system
Arguments:
This - Pointer of simple pointer Protocol.
ExtendedVerification - Whether configure mouse parameters. True: do; FALSE: skip.
Returns:
EFI_SUCCESS - The command byte is written successfully.
EFI_DEVICE_ERROR - Errors occurred during reseting keyboard.
--*/
{
EFI_STATUS Status;
PS2_MOUSE_ABSOLUTE_POINTER_DEV *MouseAbsolutePointerDev;
@ -608,26 +601,20 @@ Exit:
return Status;
}
/**
Check whether there is Ps/2 mouse device in system
@param PS2_MOUSE_DEV - Mouse Private Data Structure
@retval TRUE - Keyboard in System.
@retval FALSE - Keyboard not in System.
**/
BOOLEAN
CheckMouseAbsolutePointerConnect (
IN PS2_MOUSE_ABSOLUTE_POINTER_DEV *MouseAbsolutePointerDev
)
/*++
Routine Description:
Check whether there is Ps/2 mouse device in system
Arguments:
PS2_MOUSE_DEV - Mouse Private Data Structure
Returns:
TRUE - Keyboard in System.
FALSE - Keyboard not in System.
--*/
{
EFI_STATUS Status;
@ -639,30 +626,22 @@ Returns:
return FALSE;
}
/**
Get and Clear mouse status.
@param This - Pointer of simple pointer Protocol.
@param State - Output buffer holding status.
@retval EFI_INVALID_PARAMETER Output buffer is invalid.
@retval EFI_NOT_READY Mouse is not changed status yet.
@retval EFI_SUCCESS Mouse status is changed and get successful.
**/
EFI_STATUS
EFIAPI
MouseAbsolutePointerGetState (
IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
IN OUT EFI_ABSOLUTE_POINTER_STATE *State
)
/*++
Routine Description:
GC_TODO: Add function description
Arguments:
This - GC_TODO: add argument description
State - GC_TODO: add argument description
Returns:
EFI_INVALID_PARAMETER - GC_TODO: Add description for return value
EFI_NOT_READY - GC_TODO: Add description for return value
EFI_SUCCESS - GC_TODO: Add description for return value
--*/
{
PS2_MOUSE_ABSOLUTE_POINTER_DEV *MouseAbsolutePointerDev;
EFI_TPL OldTpl;
@ -693,24 +672,22 @@ Returns:
return EFI_SUCCESS;
}
/**
Event notification function for SIMPLE_POINTER.WaitForInput event
Signal the event if there is input from mouse
@param Event event object
@param Context event context
**/
VOID
EFIAPI
MouseAbsolutePointerWaitForInput (
IN EFI_EVENT Event,
IN VOID *Context
)
/*++
Routine Description:
Event notification function for SIMPLE_POINTER.WaitForInput event
Signal the event if there is input from mouse
Arguments:
Returns:
--*/
// GC_TODO: Event - add argument and description to function comment
// GC_TODO: Context - add argument and description to function comment
{
@ -728,29 +705,21 @@ Returns:
}
/**
Event notification function for TimerEvent event
If mouse device is connected to system, try to get the mouse packet data
@param Event - TimerEvent in PS2_MOUSE_DEV
@param Context - Pointer to PS2_MOUSE_DEV structure
**/
VOID
EFIAPI
PollMouseAbsolutePointer(
IN EFI_EVENT Event,
IN VOID *Context
)
/*++
Routine Description:
Event notification function for TimerEvent event
If mouse device is connected to system, try to get the mouse packet data
Arguments:
Event - TimerEvent in PS2_MOUSE_DEV
Context - Pointer to PS2_MOUSE_DEV structure
Returns:
None
--*/
{
PS2_MOUSE_ABSOLUTE_POINTER_DEV *MouseAbsolutePointerDev;
@ -797,3 +766,4 @@ InitializePs2MouseAbsolutePointer(
return Status;
}