EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index
Data Structures | Defines | Enumerations | Functions | Variables

IntelFrameworkModulePkg/Bus/Isa/Ps2MouseAbsolutePointerDxe/Ps2MouseAbsolutePointer.h File Reference

#include <FrameworkDxe.h>
#include <Protocol/AbsolutePointer.h>
#include <Protocol/IsaIo.h>
#include <Protocol/DevicePath.h>
#include <Library/DebugLib.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/UefiLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/ReportStatusCodeLib.h>

Go to the source code of this file.

Data Structures

struct  PS2_MOUSE_ABSOLUTE_POINTER_DEV

Defines

#define PS2_MOUSE_ABSOLUTE_POINTER_DEV_SIGNATURE   SIGNATURE_32 ('p', '2', 's', 't')
#define PS2_MOUSE_ABSOLUTE_POINTER_DEV_FROM_THIS(a)   CR (a, PS2_MOUSE_ABSOLUTE_POINTER_DEV, AbsolutePointerProtocol, PS2_MOUSE_ABSOLUTE_POINTER_DEV_SIGNATURE)

Enumerations

enum  MOUSE_SR {
  SampleRate10, SampleRate20, SampleRate40, SampleRate60,
  SampleRate80, SampleRate100, SampleRate200, MaxSampleRate,
  SampleRate10, SampleRate20, SampleRate40, SampleRate60,
  SampleRate80, SampleRate100, SampleRate200, MaxSampleRate
}
enum  MOUSE_RE {
  MouseResolution1, MouseResolution2, MouseResolution4, MouseResolution8,
  MaxResolution, MouseResolution1, MouseResolution2, MouseResolution4,
  MouseResolution8, MaxResolution
}
enum  MOUSE_SF { Scaling1, Scaling2, Scaling1, Scaling2 }

Functions

EFI_STATUS EFIAPI PS2MouseAbsolutePointerDriverSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI PS2MouseAbsolutePointerDriverStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI PS2MouseAbsolutePointerDriverStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
EFI_STATUS EFIAPI Ps2MouseAbsolutePointerComponentNameGetDriverName (IN EFI_COMPONENT_NAME_PROTOCOL *This, IN CHAR8 *Language, OUT CHAR16 **DriverName)
EFI_STATUS EFIAPI Ps2MouseAbsolutePointerComponentNameGetControllerName (IN EFI_COMPONENT_NAME_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE ChildHandle OPTIONAL, IN CHAR8 *Language, OUT CHAR16 **ControllerName)
EFI_STATUS EFIAPI MouseAbsolutePointerReset (IN EFI_ABSOLUTE_POINTER_PROTOCOL *This, IN BOOLEAN ExtendedVerification)
EFI_STATUS EFIAPI MouseAbsolutePointerGetState (IN EFI_ABSOLUTE_POINTER_PROTOCOL *This, IN OUT EFI_ABSOLUTE_POINTER_STATE *State)
VOID EFIAPI MouseAbsolutePointerWaitForInput (IN EFI_EVENT Event, IN VOID *Context)
VOID EFIAPI PollMouseAbsolutePointer (IN EFI_EVENT Event, IN VOID *Context)
EFI_STATUS In8042Data (IN EFI_ISA_IO_PROTOCOL *IsaIo, IN OUT UINT8 *Data)
BOOLEAN CheckMouseAbsolutePointerConnect (IN PS2_MOUSE_ABSOLUTE_POINTER_DEV *MouseAbsolutePointerDev)

Variables

EFI_DRIVER_BINDING_PROTOCOL gPS2MouseAbsolutePointerDriver
EFI_COMPONENT_NAME_PROTOCOL gPs2MouseAbsolutePointerComponentName
EFI_COMPONENT_NAME2_PROTOCOL gPs2MouseAbsolutePointerComponentName2

Detailed Description

A Ps2MouseAbsolutePointer driver header file

Copyright (c) 2006 - 2011, 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 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.

Definition in file Ps2MouseAbsolutePointer.h.


Define Documentation

#define PS2_MOUSE_ABSOLUTE_POINTER_DEV_FROM_THIS (   a)    CR (a, PS2_MOUSE_ABSOLUTE_POINTER_DEV, AbsolutePointerProtocol, PS2_MOUSE_ABSOLUTE_POINTER_DEV_SIGNATURE)

Definition at line 102 of file Ps2MouseAbsolutePointer.h.

#define PS2_MOUSE_ABSOLUTE_POINTER_DEV_SIGNATURE   SIGNATURE_32 ('p', '2', 's', 't')

Definition at line 75 of file Ps2MouseAbsolutePointer.h.


Enumeration Type Documentation

enum MOUSE_RE
Enumerator:
MouseResolution1 
MouseResolution2 
MouseResolution4 
MouseResolution8 
MaxResolution 
MouseResolution1 
MouseResolution2 
MouseResolution4 
MouseResolution8 
MaxResolution 

Definition at line 56 of file Ps2MouseAbsolutePointer.h.

enum MOUSE_SF
Enumerator:
Scaling1 
Scaling2 
Scaling1 
Scaling2 

Definition at line 67 of file Ps2MouseAbsolutePointer.h.

enum MOUSE_SR
Enumerator:
SampleRate10 
SampleRate20 
SampleRate40 
SampleRate60 
SampleRate80 
SampleRate100 
SampleRate200 
MaxSampleRate 
SampleRate10 
SampleRate20 
SampleRate40 
SampleRate60 
SampleRate80 
SampleRate100 
SampleRate200 
MaxSampleRate 

Definition at line 42 of file Ps2MouseAbsolutePointer.h.


Function Documentation

BOOLEAN CheckMouseAbsolutePointerConnect ( IN PS2_MOUSE_ABSOLUTE_POINTER_DEV MouseAbsolutePointerDev)

Check whether there is Ps/2 mouse device in system

Parameters:
MouseAbsolutePointerDev- Absolute Pointer Device Private Data Structure
Return values:
TRUE- Keyboard in System.
FALSE- Keyboard not in System.

Definition at line 616 of file Ps2MouseAbsolutePointer.c.

EFI_STATUS In8042Data ( IN EFI_ISA_IO_PROTOCOL IsaIo,
IN OUT UINT8 Data 
)

I/O work flow of in 8042 data.

Parameters:
IsaIoPointer to instance of EFI_ISA_IO_PROTOCOL
DataData value
Return values:
EFI_SUCCESSSuccess to excute I/O work flow
EFI_TIMEOUTKeyboard controller time out.

Definition at line 622 of file CommPs2.c.

EFI_STATUS EFIAPI MouseAbsolutePointerGetState ( IN EFI_ABSOLUTE_POINTER_PROTOCOL This,
IN OUT EFI_ABSOLUTE_POINTER_STATE State 
)

Get and Clear mouse status.

Parameters:
This- Pointer of simple pointer Protocol.
State- Output buffer holding status.
Return values:
EFI_INVALID_PARAMETEROutput buffer is invalid.
EFI_NOT_READYMouse is not changed status yet.
EFI_SUCCESSMouse status is changed and get successful.

Definition at line 643 of file Ps2MouseAbsolutePointer.c.

EFI_STATUS EFIAPI MouseAbsolutePointerReset ( IN EFI_ABSOLUTE_POINTER_PROTOCOL This,
IN BOOLEAN  ExtendedVerification 
)

Reset the Mouse and do BAT test for it, if ExtendedVerification isTRUE and there is a mouse device connectted to system.

Parameters:
This- Pointer of simple pointer Protocol.
ExtendedVerification- Whether configure mouse parameters. True: do; FALSE: skip.
Return values:
EFI_SUCCESS- The command byte is written successfully.
EFI_DEVICE_ERROR- Errors occurred during reseting keyboard.

Definition at line 503 of file Ps2MouseAbsolutePointer.c.

VOID EFIAPI MouseAbsolutePointerWaitForInput ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

Event notification function for SIMPLE_POINTER.WaitForInput event. Signal the event if there is input from mouse.

Parameters:
Eventevent object
Contextevent context

Definition at line 688 of file Ps2MouseAbsolutePointer.c.

VOID EFIAPI PollMouseAbsolutePointer ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

Event notification function for TimerEvent event. If mouse device is connected to system, try to get the mouse packet data.

Parameters:
Event- TimerEvent in PS2_MOUSE_DEV
Context- Pointer to PS2_MOUSE_DEV structure

Definition at line 717 of file Ps2MouseAbsolutePointer.c.

EFI_STATUS EFIAPI Ps2MouseAbsolutePointerComponentNameGetControllerName ( IN EFI_COMPONENT_NAME_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_HANDLE ChildHandle  OPTIONAL,
IN CHAR8 Language,
OUT CHAR16 **  ControllerName 
)

Retrieves a Unicode string that is the user readable name of the controller that is being managed by a driver.

This function retrieves the user readable name of the controller specified by ControllerHandle and ChildHandle in the form of a Unicode string. If the driver specified by This has a user readable name in the language specified by Language, then a pointer to the controller name is returned in ControllerName, and EFI_SUCCESS is returned. If the driver specified by This is not currently managing the controller specified by ControllerHandle and ChildHandle, then EFI_UNSUPPORTED is returned. If the driver specified by This does not support the language specified by Language, then EFI_UNSUPPORTED is returned.

Parameters:
This[in]A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or EFI_COMPONENT_NAME_PROTOCOL instance.
ControllerHandle[in]The handle of a controller that the driver specified by This is managing. This handle specifies the controller whose name is to be returned.
ChildHandle[in]The handle of the child controller to retrieve the name of. This is an optional parameter that may be NULL. It will be NULL for device drivers. It will also be NULL for a bus drivers that wish to retrieve the name of the bus controller. It will not be NULL for a bus driver that wishes to retrieve the name of a child controller.
Language[in]A pointer to a Null-terminated ASCII string array indicating the language. This is the language of the driver name that the caller is requesting, and it must match one of the languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. Language is specified in RFC 4646 or ISO 639-2 language code format.
ControllerName[out]A pointer to the Unicode string to return. This Unicode string is the name of the controller specified by ControllerHandle and ChildHandle in the language specified by Language from the point of view of the driver specified by This.
Return values:
EFI_SUCCESSThe Unicode string for the user readable name in the language specified by Language for the driver specified by This was returned in DriverName.
EFI_INVALID_PARAMETERControllerHandle is NULL.
EFI_INVALID_PARAMETERChildHandle is not NULL and it is not a valid EFI_HANDLE.
EFI_INVALID_PARAMETERLanguage is NULL.
EFI_INVALID_PARAMETERControllerName is NULL.
EFI_UNSUPPORTEDThe driver specified by This is not currently managing the controller specified by ControllerHandle and ChildHandle.
EFI_UNSUPPORTEDThe driver specified by This does not support the language specified by Language.

Definition at line 173 of file ComponentName.c.

EFI_STATUS EFIAPI Ps2MouseAbsolutePointerComponentNameGetDriverName ( IN EFI_COMPONENT_NAME_PROTOCOL This,
IN CHAR8 Language,
OUT CHAR16 **  DriverName 
)

Retrieves a Unicode string that is the user readable name of the driver.

This function retrieves the user readable name of a driver in the form of a Unicode string. If the driver specified by This has a user readable name in the language specified by Language, then a pointer to the driver name is returned in DriverName, and EFI_SUCCESS is returned. If the driver specified by This does not support the language specified by Language, then EFI_UNSUPPORTED is returned.

Parameters:
This[in]A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or EFI_COMPONENT_NAME_PROTOCOL instance.
Language[in]A pointer to a Null-terminated ASCII string array indicating the language. This is the language of the driver name that the caller is requesting, and it must match one of the languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. Language is specified in RFC 4646 or ISO 639-2 language code format.
DriverName[out]A pointer to the Unicode string to return. This Unicode string is the name of the driver specified by This in the language specified by Language.
Return values:
EFI_SUCCESSThe Unicode string for the Driver specified by This and the language specified by Language was returned in DriverName.
EFI_INVALID_PARAMETERLanguage is NULL.
EFI_INVALID_PARAMETERDriverName is NULL.
EFI_UNSUPPORTEDThe driver specified by This does not support the language specified by Language.

Definition at line 88 of file ComponentName.c.

EFI_STATUS EFIAPI PS2MouseAbsolutePointerDriverStart ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  Controller,
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.

Parameters:
ThisProtocol instance pointer.
ControllerHandleHandle of device to bind driver to
RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values:
EFI_SUCCESSThis driver is added to ControllerHandle
EFI_ALREADY_STARTEDThis driver is already running on ControllerHandle
otherThis driver does not support this device

Start this driver on ControllerHandle by opening a IsaIo protocol, creating PS2_MOUSE_ABSOLUTE_POINTER_DEV device and install gEfiAbsolutePointerProtocolGuid finally.

Parameters:
ThisProtocol instance pointer.
ControllerHandleHandle of device to bind driver to
RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values:
EFI_SUCCESSThis driver is added to ControllerHandle
EFI_ALREADY_STARTEDThis driver is already running on ControllerHandle
otherThis driver does not support this device

Definition at line 128 of file Ps2MouseAbsolutePointer.c.

EFI_STATUS EFIAPI PS2MouseAbsolutePointerDriverStop ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  Controller,
IN UINTN  NumberOfChildren,
IN EFI_HANDLE ChildHandleBuffer 
)

Stop this driver on ControllerHandle. Support stoping any child handles created by this driver.

Parameters:
ThisProtocol instance pointer.
ControllerHandleHandle of device to stop driver on
NumberOfChildrenNumber of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver.
ChildHandleBufferList of Child Handles to Stop.
Return values:
EFI_SUCCESSThis driver is removed ControllerHandle
otherThis driver was not removed from this device

Definition at line 410 of file Ps2MouseAbsolutePointer.c.

EFI_STATUS EFIAPI PS2MouseAbsolutePointerDriverSupported ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  Controller,
IN EFI_DEVICE_PATH_PROTOCOL RemainingDevicePath 
)

Test to see if this driver supports ControllerHandle. Any ControllerHandle than contains a IsaIo protocol can be supported.

Parameters:
ThisProtocol instance pointer.
ControllerHandleHandle of device to test
RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values:
EFI_SUCCESSThis driver supports this device
EFI_ALREADY_STARTEDThis driver is already running on this device
otherThis driver does not support this device

Definition at line 47 of file Ps2MouseAbsolutePointer.c.


Variable Documentation

Definition at line 20 of file ComponentName.c.

Definition at line 29 of file ComponentName.c.

Definition at line 22 of file Ps2MouseAbsolutePointer.c.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines