clean ECC issue

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8580 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
eric_tian
2009-06-17 01:57:42 +00:00
parent f1b87e7a60
commit 18a73eb727
7 changed files with 139 additions and 59 deletions

View File

@ -1,4 +1,4 @@
/**@file
/** @file
A Ps2MouseAbsolutePointer driver header file
Copyright (c) 2006 - 2007, Intel Corporation
@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef _PS2MOUSEABSOLUTEPOINTER_H
#define _PS2MOUSEABSOLUTEPOINTER_H
#ifndef __PS2MOUSEABSOLUTEPOINTER_H__
#define __PS2MOUSEABSOLUTEPOINTER_H__
#include <PiDxe.h>
#include <Framework/StatusCode.h>
@ -105,6 +105,20 @@ typedef struct {
//
// Function prototypes
//
/**
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 (
@ -113,6 +127,21 @@ PS2MouseAbsolutePointerDriverSupported (
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
/**
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 (
@ -121,6 +150,20 @@ PS2MouseAbsolutePointerDriverStart (
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 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 (
@ -259,7 +302,17 @@ Ps2MouseAbsolutePointerComponentNameGetControllerName (
OUT CHAR16 **ControllerName
);
/**
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 (
@ -267,6 +320,16 @@ MouseAbsolutePointerReset (
IN BOOLEAN ExtendedVerification
);
/**
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 (
@ -274,6 +337,15 @@ MouseAbsolutePointerGetState (
IN OUT EFI_ABSOLUTE_POINTER_STATE *State
);
/**
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 (
@ -281,6 +353,14 @@ MouseAbsolutePointerWaitForInput (
IN VOID *Context
);
/**
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 (
@ -288,11 +368,30 @@ PollMouseAbsolutePointer (
IN VOID *Context
);
/**
I/O work flow of in 8042 data.
@param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL
@param Data Data value
@retval EFI_SUCCESS Success to excute I/O work flow
@retval EFI_TIMEOUT Keyboard controller time out.
**/
EFI_STATUS
In8042Data (
IN EFI_ISA_IO_PROTOCOL *IsaIo,
IN OUT UINT8 *Data
);
/**
Check whether there is Ps/2 mouse device in system
@param MouseAbsolutePointerDev - Absolute Pointer Device Private Data Structure
@retval TRUE - Keyboard in System.
@retval FALSE - Keyboard not in System.
**/
BOOLEAN
CheckMouseAbsolutePointerConnect (
IN PS2_MOUSE_ABSOLUTE_POINTER_DEV *MouseAbsolutePointerDev