code scrub on Ps2MouseDxe/Ps2MouseAbsolutePointer module
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8659 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Using PS2 Mouse to simulation Absolution Pointer Device.
|
Using PS2 Mouse to simulation Absolution Pointer Device.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation
|
Copyright (c) 2006 - 2009, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -75,32 +75,50 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
//
|
//
|
||||||
// Keyboard Controller Status
|
// Keyboard Controller Status
|
||||||
//
|
//
|
||||||
#define KBC_PARE 0x80 // Parity Error
|
///
|
||||||
#define KBC_TIM 0x40 // General Time Out
|
/// Parity Error
|
||||||
#define KBC_AUXB 0x20 // Output buffer for auxiliary device (PS/2):
|
///
|
||||||
// 0 - Holds keyboard data
|
#define KBC_PARE 0x80
|
||||||
// 1 - Holds data for auxiliary device
|
///
|
||||||
//
|
/// General Time Out
|
||||||
#define KBC_KEYL 0x10 // Keyboard lock status:
|
///
|
||||||
// 0 - keyboard locked
|
#define KBC_TIM 0x40
|
||||||
// 1 - keyboard free
|
///
|
||||||
//
|
/// Output buffer for auxiliary device (PS/2):
|
||||||
#define KBC_CD 0x08 // Command/Data:
|
/// 0 - Holds keyboard data
|
||||||
// 0 - data byte written via port 60h
|
/// 1 - Holds data for auxiliary device
|
||||||
// 1 - command byte written via port 64h
|
///
|
||||||
//
|
#define KBC_AUXB 0x20
|
||||||
#define KBC_SYSF 0x04 // System Flag:
|
///
|
||||||
// 0 - power-on reset
|
/// Keyboard lock status:
|
||||||
// 1 - self-test successful
|
/// 0 - keyboard locked
|
||||||
//
|
/// 1 - keyboard free
|
||||||
#define KBC_INPB 0x02 // Input Buffer Status :
|
///
|
||||||
// 0 - input buffer empty
|
#define KBC_KEYL 0x10
|
||||||
// 1 - CPU data in input buffer
|
///
|
||||||
//
|
/// Command/Data:
|
||||||
#define KBC_OUTB 0x01 // Output Buffer Status :
|
/// 0 - data byte written via port 60h
|
||||||
// 0 - output buffer empty
|
/// 1 - command byte written via port 64h
|
||||||
// 1 - keyboard controller data in output buffer
|
///
|
||||||
//
|
#define KBC_CD 0x08
|
||||||
|
///
|
||||||
|
/// System Flag:
|
||||||
|
/// 0 - power-on reset
|
||||||
|
/// 1 - self-test successful
|
||||||
|
///
|
||||||
|
#define KBC_SYSF 0x04
|
||||||
|
///
|
||||||
|
/// Input Buffer Status :
|
||||||
|
/// 0 - input buffer empty
|
||||||
|
/// 1 - CPU data in input buffer
|
||||||
|
///
|
||||||
|
#define KBC_INPB 0x02
|
||||||
|
///
|
||||||
|
/// Output Buffer Status :
|
||||||
|
/// 0 - output buffer empty
|
||||||
|
/// 1 - keyboard controller data in output buffer
|
||||||
|
///
|
||||||
|
#define KBC_OUTB 0x01
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Issue self test command via IsaIo interface.
|
Issue self test command via IsaIo interface.
|
||||||
@ -413,4 +431,5 @@ WaitOutputFull (
|
|||||||
IN UINTN Timeout
|
IN UINTN Timeout
|
||||||
);
|
);
|
||||||
|
|
||||||
#endif // __COMMPS2_H__
|
#endif
|
||||||
|
|
||||||
|
@ -109,9 +109,9 @@ PS2MouseAbsolutePointerDriverSupported (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Start this driver on ControllerHandle by opening a IsaIo
|
Start this driver on ControllerHandle by opening a IsaIo protocol, creating
|
||||||
protocol, creating PS2_MOUSE_ABSOLUTE_POINTER_DEV device and install gEfiAbsolutePointerProtocolGuid
|
PS2_MOUSE_ABSOLUTE_POINTER_DEV device and install gEfiAbsolutePointerProtocolGuid
|
||||||
finnally.
|
finally.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param This Protocol instance pointer.
|
||||||
@param ControllerHandle Handle of device to bind driver to
|
@param ControllerHandle Handle of device to bind driver to
|
||||||
@ -363,7 +363,7 @@ ErrorExit:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (MouseAbsolutePointerDev != NULL) {
|
if (MouseAbsolutePointerDev != NULL) {
|
||||||
gBS->FreePool (MouseAbsolutePointerDev);
|
FreePool (MouseAbsolutePointerDev);
|
||||||
}
|
}
|
||||||
|
|
||||||
gBS->CloseProtocol (
|
gBS->CloseProtocol (
|
||||||
@ -466,7 +466,7 @@ PS2MouseAbsolutePointerDriverStop (
|
|||||||
|
|
||||||
gBS->CloseEvent (MouseAbsolutePointerDev->AbsolutePointerProtocol.WaitForInput);
|
gBS->CloseEvent (MouseAbsolutePointerDev->AbsolutePointerProtocol.WaitForInput);
|
||||||
FreeUnicodeStringTable (MouseAbsolutePointerDev->ControllerNameTable);
|
FreeUnicodeStringTable (MouseAbsolutePointerDev->ControllerNameTable);
|
||||||
gBS->FreePool (MouseAbsolutePointerDev);
|
FreePool (MouseAbsolutePointerDev);
|
||||||
|
|
||||||
gBS->CloseProtocol (
|
gBS->CloseProtocol (
|
||||||
Controller,
|
Controller,
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
FILE_GUID = 2899C94A-1FB6-4b1a-B96B-8364975303E0
|
FILE_GUID = 2899C94A-1FB6-4b1a-B96B-8364975303E0
|
||||||
MODULE_TYPE = UEFI_DRIVER
|
MODULE_TYPE = UEFI_DRIVER
|
||||||
VERSION_STRING = 1.0
|
VERSION_STRING = 1.0
|
||||||
EFI_SPECIFICATION_VERSION = 0x00020000
|
|
||||||
ENTRY_POINT = InitializePs2MouseAbsolutePointer
|
ENTRY_POINT = InitializePs2MouseAbsolutePointer
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#/** @file
|
#/** @file
|
||||||
# Ps2 Mouse Driver
|
# Ps2 Mouse Driver.
|
||||||
#
|
#
|
||||||
# This dirver directly uses IsaIo protocol service to support Ps2 mouse work.
|
# This dirver directly uses IsaIo protocol service to support Ps2 mouse work.
|
||||||
# Copyright (c) 2006 - 2009, Intel Corporation.
|
# Copyright (c) 2006 - 2009, Intel Corporation.
|
||||||
@ -21,7 +21,6 @@
|
|||||||
FILE_GUID = 202A2B0E-9A31-4812-B291-8747DF152439
|
FILE_GUID = 202A2B0E-9A31-4812-B291-8747DF152439
|
||||||
MODULE_TYPE = UEFI_DRIVER
|
MODULE_TYPE = UEFI_DRIVER
|
||||||
VERSION_STRING = 1.0
|
VERSION_STRING = 1.0
|
||||||
EFI_SPECIFICATION_VERSION = 0x00020000
|
|
||||||
ENTRY_POINT = InitializePs2Mouse
|
ENTRY_POINT = InitializePs2Mouse
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -59,3 +58,13 @@
|
|||||||
gEfiDevicePathProtocolGuid # PROTOCOL TO_START
|
gEfiDevicePathProtocolGuid # PROTOCOL TO_START
|
||||||
|
|
||||||
|
|
||||||
|
# [Event]
|
||||||
|
# ##
|
||||||
|
# # Event will be signaled for WaitForKey event.
|
||||||
|
# #
|
||||||
|
# EVT_NOTIFY_WAIT ## PRODUCES
|
||||||
|
#
|
||||||
|
# ##
|
||||||
|
# # Event will be used to poll mouse state.
|
||||||
|
# #
|
||||||
|
# EVT_NOTIFY_SIGNAL ## PRODUCES
|
Reference in New Issue
Block a user