mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 17:52:56 +00:00
formatting fix tabs to 4 spaces
svn path=/trunk/; revision=39517
This commit is contained in:
parent
cae45b3c21
commit
a2feddeab2
11 changed files with 3295 additions and 3380 deletions
|
@ -13,8 +13,7 @@
|
|||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
NTSTATUS NTAPI
|
||||
i8042Create(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
i8042Create(IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
TRACE_(I8042PRT, "IRP_MJ_CREATE\n");
|
||||
|
@ -26,8 +25,7 @@ i8042Create(
|
|||
}
|
||||
|
||||
NTSTATUS NTAPI
|
||||
i8042Cleanup(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
i8042Cleanup(IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
TRACE_(I8042PRT, "IRP_MJ_CLEANUP\n");
|
||||
|
@ -39,8 +37,7 @@ i8042Cleanup(
|
|||
}
|
||||
|
||||
NTSTATUS NTAPI
|
||||
i8042Close(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
i8042Close(IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
TRACE_(I8042PRT, "IRP_MJ_CLOSE\n");
|
||||
|
|
|
@ -23,8 +23,7 @@ static DRIVER_DISPATCH i8042InternalDeviceControl;
|
|||
DRIVER_INITIALIZE DriverEntry;
|
||||
|
||||
NTSTATUS NTAPI
|
||||
i8042AddDevice(
|
||||
IN PDRIVER_OBJECT DriverObject,
|
||||
i8042AddDevice(IN PDRIVER_OBJECT DriverObject,
|
||||
IN PDEVICE_OBJECT Pdo)
|
||||
{
|
||||
PI8042_DRIVER_EXTENSION DriverExtension;
|
||||
|
@ -91,8 +90,7 @@ cleanup:
|
|||
}
|
||||
|
||||
VOID NTAPI
|
||||
i8042SendHookWorkItem(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
i8042SendHookWorkItem(IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PVOID Context)
|
||||
{
|
||||
PI8042_HOOK_WORKITEM WorkItemData;
|
||||
|
@ -216,8 +214,7 @@ cleanup:
|
|||
}
|
||||
|
||||
static VOID NTAPI
|
||||
i8042StartIo(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
i8042StartIo(IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
PFDO_DEVICE_EXTENSION DeviceExtension;
|
||||
|
@ -236,11 +233,10 @@ i8042StartIo(
|
|||
}
|
||||
|
||||
/* Write the current byte of the packet. Returns FALSE in case
|
||||
* of problems.
|
||||
*/
|
||||
* of problems.
|
||||
*/
|
||||
static BOOLEAN
|
||||
i8042PacketWrite(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension)
|
||||
i8042PacketWrite(IN PPORT_DEVICE_EXTENSION DeviceExtension)
|
||||
{
|
||||
UCHAR Port = DeviceExtension->PacketPort;
|
||||
|
||||
|
@ -262,8 +258,7 @@ i8042PacketWrite(
|
|||
}
|
||||
|
||||
BOOLEAN
|
||||
i8042PacketIsr(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
i8042PacketIsr(IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
IN UCHAR Output)
|
||||
{
|
||||
if (DeviceExtension->Packet.State == Idle)
|
||||
|
@ -316,12 +311,11 @@ i8042PacketIsr(
|
|||
}
|
||||
|
||||
/*
|
||||
* This function starts a packet. It must be called with the
|
||||
* correct DIRQL.
|
||||
*/
|
||||
* This function starts a packet. It must be called with the
|
||||
* correct DIRQL.
|
||||
*/
|
||||
NTSTATUS
|
||||
i8042StartPacket(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
i8042StartPacket(IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
IN PFDO_DEVICE_EXTENSION FdoDeviceExtension,
|
||||
IN PUCHAR Bytes,
|
||||
IN ULONG ByteCount,
|
||||
|
@ -381,8 +375,7 @@ done:
|
|||
}
|
||||
|
||||
static NTSTATUS NTAPI
|
||||
IrpStub(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IrpStub(IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
NTSTATUS Status = Irp->IoStatus.Status;
|
||||
|
@ -394,8 +387,7 @@ IrpStub(
|
|||
}
|
||||
|
||||
static NTSTATUS NTAPI
|
||||
i8042DeviceControl(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
i8042DeviceControl(IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
PFDO_DEVICE_EXTENSION DeviceExtension;
|
||||
|
@ -417,8 +409,7 @@ i8042DeviceControl(
|
|||
}
|
||||
|
||||
static NTSTATUS NTAPI
|
||||
i8042InternalDeviceControl(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
i8042InternalDeviceControl(IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
PFDO_DEVICE_EXTENSION DeviceExtension;
|
||||
|
@ -467,8 +458,7 @@ i8042InternalDeviceControl(
|
|||
}
|
||||
|
||||
NTSTATUS NTAPI
|
||||
DriverEntry(
|
||||
IN PDRIVER_OBJECT DriverObject,
|
||||
DriverEntry(IN PDRIVER_OBJECT DriverObject,
|
||||
IN PUNICODE_STRING RegistryPath)
|
||||
{
|
||||
PI8042_DRIVER_EXTENSION DriverExtension;
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
#include <debug.h>
|
||||
|
||||
/*-----------------------------------------------------
|
||||
* Structures
|
||||
* --------------------------------------------------*/
|
||||
* Structures
|
||||
* --------------------------------------------------*/
|
||||
|
||||
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
|
||||
#define I8042PRT_TAG TAG('8', '0', '4', '2')
|
||||
|
@ -209,8 +209,8 @@ typedef struct _I8042_HOOK_WORKITEM
|
|||
} I8042_HOOK_WORKITEM, *PI8042_HOOK_WORKITEM;
|
||||
|
||||
/*-----------------------------------------------------
|
||||
* Some defines
|
||||
* --------------------------------------------------*/
|
||||
* Some defines
|
||||
* --------------------------------------------------*/
|
||||
|
||||
#define MAX(a, b) ((a) >= (b) ? (a) : (b))
|
||||
|
||||
|
@ -219,8 +219,8 @@ typedef struct _I8042_HOOK_WORKITEM
|
|||
#define KEYBOARD_WAKE_CODE 0x63
|
||||
|
||||
/*-----------------------------------------------------
|
||||
* Controller commands
|
||||
* --------------------------------------------------*/
|
||||
* Controller commands
|
||||
* --------------------------------------------------*/
|
||||
|
||||
#define KBD_READ_MODE 0x20
|
||||
#define KBD_WRITE_MODE 0x60
|
||||
|
@ -230,15 +230,15 @@ typedef struct _I8042_HOOK_WORKITEM
|
|||
#define CTRL_WRITE_MOUSE 0xD4
|
||||
|
||||
/*-----------------------------------------------------
|
||||
* Keyboard commands
|
||||
* --------------------------------------------------*/
|
||||
* Keyboard commands
|
||||
* --------------------------------------------------*/
|
||||
|
||||
#define KBD_CMD_SET_LEDS 0xED
|
||||
#define KBD_CMD_GET_ID 0xF2
|
||||
|
||||
/*-----------------------------------------------------
|
||||
* Keyboard responses
|
||||
* --------------------------------------------------*/
|
||||
* Keyboard responses
|
||||
* --------------------------------------------------*/
|
||||
|
||||
#define KBD_SELF_TEST_OK 0x55
|
||||
#define KBD_ACK 0xFA
|
||||
|
@ -246,8 +246,8 @@ typedef struct _I8042_HOOK_WORKITEM
|
|||
#define KBD_RESEND 0xFE
|
||||
|
||||
/*-----------------------------------------------------
|
||||
* Controller status register bits
|
||||
* --------------------------------------------------*/
|
||||
* Controller status register bits
|
||||
* --------------------------------------------------*/
|
||||
|
||||
#define KBD_OBF 0x01
|
||||
#define KBD_IBF 0x02
|
||||
|
@ -255,8 +255,8 @@ typedef struct _I8042_HOOK_WORKITEM
|
|||
#define KBD_PERR 0x80
|
||||
|
||||
/*-----------------------------------------------------
|
||||
* Controller command byte bits
|
||||
* --------------------------------------------------*/
|
||||
* Controller command byte bits
|
||||
* --------------------------------------------------*/
|
||||
|
||||
#define CCB_KBD_INT_ENAB 0x01
|
||||
#define CCB_MOUSE_INT_ENAB 0x02
|
||||
|
@ -266,31 +266,31 @@ typedef struct _I8042_HOOK_WORKITEM
|
|||
#define CCB_TRANSLATE 0x40
|
||||
|
||||
/*-----------------------------------------------------
|
||||
* LED bits
|
||||
* --------------------------------------------------*/
|
||||
* LED bits
|
||||
* --------------------------------------------------*/
|
||||
|
||||
#define KBD_LED_SCROLL 0x01
|
||||
#define KBD_LED_NUM 0x02
|
||||
#define KBD_LED_CAPS 0x04
|
||||
|
||||
/*-----------------------------------------------------
|
||||
* Mouse commands
|
||||
* --------------------------------------------------*/
|
||||
* Mouse commands
|
||||
* --------------------------------------------------*/
|
||||
|
||||
#define MOU_ENAB 0xF4
|
||||
#define MOU_CMD_RESET 0xFF
|
||||
|
||||
/*-----------------------------------------------------
|
||||
* Mouse responses
|
||||
* --------------------------------------------------*/
|
||||
* Mouse responses
|
||||
* --------------------------------------------------*/
|
||||
|
||||
#define MOUSE_ACK 0xFA
|
||||
#define MOUSE_ERROR 0xFC
|
||||
#define MOUSE_NACK 0xFE
|
||||
|
||||
/*-----------------------------------------------------
|
||||
* Prototypes
|
||||
* --------------------------------------------------*/
|
||||
* Prototypes
|
||||
* --------------------------------------------------*/
|
||||
|
||||
/* createclose.c */
|
||||
|
||||
|
@ -305,8 +305,7 @@ DRIVER_DISPATCH i8042Close;
|
|||
/* keyboard.c */
|
||||
|
||||
NTSTATUS NTAPI
|
||||
i8042SynchWritePortKbd(
|
||||
IN PVOID Context,
|
||||
i8042SynchWritePortKbd(IN PVOID Context,
|
||||
IN UCHAR Value,
|
||||
IN BOOLEAN WaitForAck);
|
||||
|
||||
|
@ -323,13 +322,11 @@ KSERVICE_ROUTINE i8042KbdInterruptService;
|
|||
DRIVER_ADD_DEVICE i8042AddDevice;
|
||||
|
||||
BOOLEAN
|
||||
i8042PacketIsr(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
i8042PacketIsr(IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
IN UCHAR Output);
|
||||
|
||||
NTSTATUS
|
||||
i8042StartPacket(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
i8042StartPacket(IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
IN PFDO_DEVICE_EXTENSION FdoDeviceExtension,
|
||||
IN PUCHAR Bytes,
|
||||
IN ULONG ByteCount,
|
||||
|
@ -342,26 +339,22 @@ DRIVER_DISPATCH ForwardIrpAndForget;
|
|||
DRIVER_DISPATCH ForwardIrpAndWait;
|
||||
|
||||
NTSTATUS
|
||||
DuplicateUnicodeString(
|
||||
IN ULONG Flags,
|
||||
DuplicateUnicodeString(IN ULONG Flags,
|
||||
IN PCUNICODE_STRING SourceString,
|
||||
OUT PUNICODE_STRING DestinationString);
|
||||
|
||||
/* mouse.c */
|
||||
|
||||
VOID
|
||||
i8042MouHandle(
|
||||
IN PI8042_MOUSE_EXTENSION DeviceExtension,
|
||||
i8042MouHandle(IN PI8042_MOUSE_EXTENSION DeviceExtension,
|
||||
IN UCHAR Output);
|
||||
|
||||
VOID
|
||||
i8042MouHandleButtons(
|
||||
IN PI8042_MOUSE_EXTENSION DeviceExtension,
|
||||
i8042MouHandleButtons(IN PI8042_MOUSE_EXTENSION DeviceExtension,
|
||||
IN USHORT Mask);
|
||||
|
||||
NTSTATUS
|
||||
i8042MouInitialize(
|
||||
IN PI8042_MOUSE_EXTENSION DeviceExtension);
|
||||
i8042MouInitialize(IN PI8042_MOUSE_EXTENSION DeviceExtension);
|
||||
|
||||
DRIVER_DISPATCH i8042MouInternalDeviceControl;
|
||||
|
||||
|
@ -370,8 +363,7 @@ KSERVICE_ROUTINE i8042MouInterruptService;
|
|||
/* pnp.c */
|
||||
|
||||
BOOLEAN
|
||||
i8042ChangeMode(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
i8042ChangeMode(IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
IN UCHAR FlagsToDisable,
|
||||
IN UCHAR FlagsToEnable);
|
||||
|
||||
|
@ -379,25 +371,21 @@ DRIVER_DISPATCH i8042Pnp;
|
|||
|
||||
/* ps2pp.c */
|
||||
VOID
|
||||
i8042MouHandlePs2pp(
|
||||
IN PI8042_MOUSE_EXTENSION DeviceExtension,
|
||||
i8042MouHandlePs2pp(IN PI8042_MOUSE_EXTENSION DeviceExtension,
|
||||
IN UCHAR Input);
|
||||
|
||||
/* readwrite.c */
|
||||
|
||||
VOID
|
||||
i8042Flush(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension);
|
||||
i8042Flush(IN PPORT_DEVICE_EXTENSION DeviceExtension);
|
||||
|
||||
BOOLEAN
|
||||
i8042IsrWritePort(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
i8042IsrWritePort(IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
IN UCHAR Value,
|
||||
IN UCHAR SelectCmd OPTIONAL);
|
||||
|
||||
NTSTATUS
|
||||
i8042ReadData(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
i8042ReadData(IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
IN UCHAR StatusFlags,
|
||||
OUT PUCHAR Data);
|
||||
#define i8042ReadKeyboardData(DeviceExtension, Data) \
|
||||
|
@ -406,50 +394,42 @@ i8042ReadData(
|
|||
i8042ReadData(DeviceExtension, MOU_OBF, Data)
|
||||
|
||||
NTSTATUS
|
||||
i8042ReadDataWait(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
i8042ReadDataWait(IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
OUT PUCHAR Data);
|
||||
|
||||
NTSTATUS
|
||||
i8042ReadStatus(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
i8042ReadStatus(IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
OUT PUCHAR Status);
|
||||
|
||||
NTSTATUS NTAPI
|
||||
i8042SynchReadPort(
|
||||
IN PVOID Context,
|
||||
i8042SynchReadPort(IN PVOID Context,
|
||||
OUT PUCHAR Value,
|
||||
IN BOOLEAN WaitForAck);
|
||||
|
||||
NTSTATUS NTAPI
|
||||
i8042SynchWritePort(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
i8042SynchWritePort(IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
IN UCHAR Port,
|
||||
IN UCHAR Value,
|
||||
IN BOOLEAN WaitForAck);
|
||||
|
||||
BOOLEAN
|
||||
i8042Write(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
i8042Write(IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
IN PUCHAR addr,
|
||||
IN UCHAR data);
|
||||
|
||||
/* registry.c */
|
||||
|
||||
NTSTATUS
|
||||
ReadRegistryEntries(
|
||||
IN PUNICODE_STRING RegistryPath,
|
||||
ReadRegistryEntries(IN PUNICODE_STRING RegistryPath,
|
||||
OUT PI8042_SETTINGS Settings);
|
||||
|
||||
/* setup.c */
|
||||
|
||||
BOOLEAN
|
||||
IsFirstStageSetup(
|
||||
VOID);
|
||||
IsFirstStageSetup(VOID);
|
||||
|
||||
NTSTATUS
|
||||
i8042AddLegacyKeyboard(
|
||||
IN PDRIVER_OBJECT DriverObject,
|
||||
i8042AddLegacyKeyboard(IN PDRIVER_OBJECT DriverObject,
|
||||
IN PUNICODE_STRING RegistryPath);
|
||||
|
||||
#endif // _I8042PRT_H_
|
||||
|
|
|
@ -35,8 +35,7 @@ static LOCAL_KEYBOARD_INDICATOR_TRANSLATION IndicatorTranslation = { 3, {
|
|||
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
|
||||
|
||||
static VOID NTAPI
|
||||
i8042DebugWorkItem(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
i8042DebugWorkItem(IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PVOID Key)
|
||||
{
|
||||
INFO_(I8042PRT, "Debug key: p\n", Key);
|
||||
|
@ -51,31 +50,30 @@ i8042DebugWorkItem(
|
|||
}
|
||||
|
||||
/*
|
||||
* These functions are callbacks for filter driver custom interrupt
|
||||
* service routines.
|
||||
*/
|
||||
* These functions are callbacks for filter driver custom interrupt
|
||||
* service routines.
|
||||
*/
|
||||
/*static VOID NTAPI
|
||||
i8042KbdIsrWritePort(
|
||||
IN PVOID Context,
|
||||
IN UCHAR Value)
|
||||
IN PVOID Context,
|
||||
IN UCHAR Value)
|
||||
{
|
||||
PI8042_KEYBOARD_EXTENSION DeviceExtension;
|
||||
PI8042_KEYBOARD_EXTENSION DeviceExtension;
|
||||
|
||||
DeviceExtension = (PI8042_KEYBOARD_EXTENSION)Context;
|
||||
DeviceExtension = (PI8042_KEYBOARD_EXTENSION)Context;
|
||||
|
||||
if (DeviceExtension->KeyboardHook.IsrWritePort)
|
||||
{
|
||||
DeviceExtension->KeyboardHook.IsrWritePort(
|
||||
DeviceExtension->KeyboardHook.CallContext,
|
||||
Value);
|
||||
}
|
||||
else
|
||||
i8042IsrWritePort(Context, Value, 0);
|
||||
if (DeviceExtension->KeyboardHook.IsrWritePort)
|
||||
{
|
||||
DeviceExtension->KeyboardHook.IsrWritePort(
|
||||
DeviceExtension->KeyboardHook.CallContext,
|
||||
Value);
|
||||
}
|
||||
else
|
||||
i8042IsrWritePort(Context, Value, 0);
|
||||
}*/
|
||||
|
||||
static VOID NTAPI
|
||||
i8042KbdQueuePacket(
|
||||
IN PVOID Context)
|
||||
i8042KbdQueuePacket(IN PVOID Context)
|
||||
{
|
||||
PI8042_KEYBOARD_EXTENSION DeviceExtension;
|
||||
|
||||
|
@ -94,28 +92,25 @@ i8042KbdQueuePacket(
|
|||
}
|
||||
|
||||
/*
|
||||
* These functions are callbacks for filter driver custom
|
||||
* initialization routines.
|
||||
*/
|
||||
* These functions are callbacks for filter driver custom
|
||||
* initialization routines.
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
i8042SynchWritePortKbd(
|
||||
IN PVOID Context,
|
||||
i8042SynchWritePortKbd(IN PVOID Context,
|
||||
IN UCHAR Value,
|
||||
IN BOOLEAN WaitForAck)
|
||||
{
|
||||
return i8042SynchWritePort(
|
||||
(PPORT_DEVICE_EXTENSION)Context,
|
||||
return i8042SynchWritePort((PPORT_DEVICE_EXTENSION)Context,
|
||||
0,
|
||||
Value,
|
||||
WaitForAck);
|
||||
}
|
||||
|
||||
/*
|
||||
* Process the keyboard internal device requests
|
||||
*/
|
||||
* Process the keyboard internal device requests
|
||||
*/
|
||||
VOID NTAPI
|
||||
i8042KbdStartIo(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
i8042KbdStartIo(IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
PIO_STACK_LOCATION Stack;
|
||||
|
@ -165,8 +160,7 @@ i8042KbdStartIo(
|
|||
}
|
||||
|
||||
static VOID
|
||||
i8042PacketDpc(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension)
|
||||
i8042PacketDpc(IN PPORT_DEVICE_EXTENSION DeviceExtension)
|
||||
{
|
||||
BOOLEAN FinishIrp = FALSE;
|
||||
KIRQL Irql;
|
||||
|
@ -203,8 +197,7 @@ i8042PacketDpc(
|
|||
}
|
||||
|
||||
static VOID NTAPI
|
||||
i8042PowerWorkItem(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
i8042PowerWorkItem(IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PVOID Context)
|
||||
{
|
||||
PI8042_KEYBOARD_EXTENSION DeviceExtension;
|
||||
|
@ -287,8 +280,7 @@ i8042PowerWorkItem(
|
|||
|
||||
/* Return TRUE if it was a power key */
|
||||
static BOOLEAN
|
||||
HandlePowerKeys(
|
||||
IN PI8042_KEYBOARD_EXTENSION DeviceExtension)
|
||||
HandlePowerKeys(IN PI8042_KEYBOARD_EXTENSION DeviceExtension)
|
||||
{
|
||||
PKEYBOARD_INPUT_DATA InputData;
|
||||
ULONG KeyPress;
|
||||
|
@ -328,8 +320,7 @@ HandlePowerKeys(
|
|||
}
|
||||
|
||||
static VOID NTAPI
|
||||
i8042KbdDpcRoutine(
|
||||
IN PKDPC Dpc,
|
||||
i8042KbdDpcRoutine(IN PKDPC Dpc,
|
||||
IN PVOID DeferredContext,
|
||||
IN PVOID SystemArgument1,
|
||||
IN PVOID SystemArgument2)
|
||||
|
@ -401,11 +392,10 @@ i8042KbdDpcRoutine(
|
|||
}
|
||||
|
||||
/*
|
||||
* Runs the keyboard IOCTL dispatch.
|
||||
*/
|
||||
* Runs the keyboard IOCTL dispatch.
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
i8042KbdDeviceControl(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
i8042KbdDeviceControl(IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
PIO_STACK_LOCATION Stack;
|
||||
|
@ -503,11 +493,10 @@ i8042KbdDeviceControl(
|
|||
}
|
||||
|
||||
/*
|
||||
* Runs the keyboard IOCTL_INTERNAL dispatch.
|
||||
*/
|
||||
* Runs the keyboard IOCTL_INTERNAL dispatch.
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
i8042KbdInternalDeviceControl(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
i8042KbdInternalDeviceControl(IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
PIO_STACK_LOCATION Stack;
|
||||
|
@ -710,14 +699,13 @@ cleanup:
|
|||
}
|
||||
|
||||
/*
|
||||
* Call the customization hook. The ToReturn parameter is about wether
|
||||
* we should go on with the interrupt. The return value is what
|
||||
* we should return (indicating to the system wether someone else
|
||||
* should try to handle the interrupt)
|
||||
*/
|
||||
* Call the customization hook. The ToReturn parameter is about wether
|
||||
* we should go on with the interrupt. The return value is what
|
||||
* we should return (indicating to the system wether someone else
|
||||
* should try to handle the interrupt)
|
||||
*/
|
||||
static BOOLEAN
|
||||
i8042KbdCallIsrHook(
|
||||
IN PI8042_KEYBOARD_EXTENSION DeviceExtension,
|
||||
i8042KbdCallIsrHook(IN PI8042_KEYBOARD_EXTENSION DeviceExtension,
|
||||
IN UCHAR Status,
|
||||
IN UCHAR Input,
|
||||
OUT PBOOLEAN ToReturn)
|
||||
|
@ -747,8 +735,7 @@ i8042KbdCallIsrHook(
|
|||
}
|
||||
|
||||
BOOLEAN NTAPI
|
||||
i8042KbdInterruptService(
|
||||
IN PKINTERRUPT Interrupt,
|
||||
i8042KbdInterruptService(IN PKINTERRUPT Interrupt,
|
||||
PVOID Context)
|
||||
{
|
||||
PI8042_KEYBOARD_EXTENSION DeviceExtension;
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
NTSTATUS NTAPI
|
||||
ForwardIrpAndWait(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
ForwardIrpAndWait(IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
PDEVICE_OBJECT LowerDevice = ((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->LowerDevice;
|
||||
|
@ -28,8 +27,7 @@ ForwardIrpAndWait(
|
|||
}
|
||||
|
||||
NTSTATUS NTAPI
|
||||
ForwardIrpAndForget(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
ForwardIrpAndForget(IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
PDEVICE_OBJECT LowerDevice = ((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->LowerDevice;
|
||||
|
@ -41,8 +39,7 @@ ForwardIrpAndForget(
|
|||
}
|
||||
|
||||
NTSTATUS
|
||||
DuplicateUnicodeString(
|
||||
IN ULONG Flags,
|
||||
DuplicateUnicodeString(IN ULONG Flags,
|
||||
IN PCUNICODE_STRING SourceString,
|
||||
OUT PUNICODE_STRING DestinationString)
|
||||
{
|
||||
|
|
|
@ -17,12 +17,11 @@
|
|||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
/*
|
||||
* These functions are callbacks for filter driver custom interrupt
|
||||
* service routines.
|
||||
*/
|
||||
* These functions are callbacks for filter driver custom interrupt
|
||||
* service routines.
|
||||
*/
|
||||
static VOID NTAPI
|
||||
i8042MouIsrWritePort(
|
||||
IN PVOID Context,
|
||||
i8042MouIsrWritePort(IN PVOID Context,
|
||||
IN UCHAR Value)
|
||||
{
|
||||
PI8042_MOUSE_EXTENSION DeviceExtension;
|
||||
|
@ -40,8 +39,7 @@ i8042MouIsrWritePort(
|
|||
}
|
||||
|
||||
static VOID NTAPI
|
||||
i8042MouQueuePacket(
|
||||
IN PVOID Context)
|
||||
i8042MouQueuePacket(IN PVOID Context)
|
||||
{
|
||||
PI8042_MOUSE_EXTENSION DeviceExtension;
|
||||
|
||||
|
@ -60,8 +58,7 @@ i8042MouQueuePacket(
|
|||
}
|
||||
|
||||
VOID
|
||||
i8042MouHandle(
|
||||
IN PI8042_MOUSE_EXTENSION DeviceExtension,
|
||||
i8042MouHandle(IN PI8042_MOUSE_EXTENSION DeviceExtension,
|
||||
IN UCHAR Output)
|
||||
{
|
||||
PMOUSE_INPUT_DATA MouseInput;
|
||||
|
@ -179,12 +176,11 @@ i8042MouHandle(
|
|||
}
|
||||
|
||||
/*
|
||||
* Updates ButtonFlags according to RawButtons and a saved state;
|
||||
* Only takes in account the bits that are set in Mask
|
||||
*/
|
||||
* Updates ButtonFlags according to RawButtons and a saved state;
|
||||
* Only takes in account the bits that are set in Mask
|
||||
*/
|
||||
VOID
|
||||
i8042MouHandleButtons(
|
||||
IN PI8042_MOUSE_EXTENSION DeviceExtension,
|
||||
i8042MouHandleButtons(IN PI8042_MOUSE_EXTENSION DeviceExtension,
|
||||
IN USHORT Mask)
|
||||
{
|
||||
PMOUSE_INPUT_DATA MouseInput;
|
||||
|
@ -213,11 +209,10 @@ i8042MouHandleButtons(
|
|||
}
|
||||
|
||||
/* Does lastest initializations for the mouse. This method
|
||||
* is called just before connecting the interrupt.
|
||||
*/
|
||||
* is called just before connecting the interrupt.
|
||||
*/
|
||||
NTSTATUS
|
||||
i8042MouInitialize(
|
||||
IN PI8042_MOUSE_EXTENSION DeviceExtension)
|
||||
i8042MouInitialize(IN PI8042_MOUSE_EXTENSION DeviceExtension)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
UCHAR Value;
|
||||
|
@ -250,8 +245,7 @@ i8042MouInitialize(
|
|||
}
|
||||
|
||||
static VOID NTAPI
|
||||
i8042MouDpcRoutine(
|
||||
IN PKDPC Dpc,
|
||||
i8042MouDpcRoutine(IN PKDPC Dpc,
|
||||
IN PVOID DeferredContext,
|
||||
IN PVOID SystemArgument1,
|
||||
IN PVOID SystemArgument2)
|
||||
|
@ -334,12 +328,11 @@ i8042MouDpcRoutine(
|
|||
}
|
||||
|
||||
/* This timer DPC will be called when the mouse reset times out.
|
||||
* I'll just send the 'disable mouse port' command to the controller
|
||||
* and say the mouse doesn't exist.
|
||||
*/
|
||||
* I'll just send the 'disable mouse port' command to the controller
|
||||
* and say the mouse doesn't exist.
|
||||
*/
|
||||
static VOID NTAPI
|
||||
i8042DpcRoutineMouseTimeout(
|
||||
IN PKDPC Dpc,
|
||||
i8042DpcRoutineMouseTimeout(IN PKDPC Dpc,
|
||||
IN PVOID DeferredContext,
|
||||
IN PVOID SystemArgument1,
|
||||
IN PVOID SystemArgument2)
|
||||
|
@ -366,11 +359,10 @@ i8042DpcRoutineMouseTimeout(
|
|||
}
|
||||
|
||||
/*
|
||||
* Runs the mouse IOCTL_INTERNAL dispatch.
|
||||
*/
|
||||
* Runs the mouse IOCTL_INTERNAL dispatch.
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
i8042MouInternalDeviceControl(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
i8042MouInternalDeviceControl(IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
PIO_STACK_LOCATION Stack;
|
||||
|
@ -503,18 +495,17 @@ cleanup:
|
|||
}
|
||||
|
||||
/* Test if packets are taking too long to come in. If they do, we
|
||||
* might have gotten out of sync and should just drop what we have.
|
||||
*
|
||||
* If we want to be totally right, we'd also have to keep a count of
|
||||
* errors, and totally reset the mouse after too much of them (can
|
||||
* happen if the user is using a KVM switch and an OS on another port
|
||||
* resets the mouse, or if the user hotplugs the mouse, or if we're just
|
||||
* generally unlucky). Also note the input parsing routine where we
|
||||
* drop invalid input packets.
|
||||
*/
|
||||
* might have gotten out of sync and should just drop what we have.
|
||||
*
|
||||
* If we want to be totally right, we'd also have to keep a count of
|
||||
* errors, and totally reset the mouse after too much of them (can
|
||||
* happen if the user is using a KVM switch and an OS on another port
|
||||
* resets the mouse, or if the user hotplugs the mouse, or if we're just
|
||||
* generally unlucky). Also note the input parsing routine where we
|
||||
* drop invalid input packets.
|
||||
*/
|
||||
static VOID
|
||||
i8042MouInputTestTimeout(
|
||||
IN PI8042_MOUSE_EXTENSION DeviceExtension)
|
||||
i8042MouInputTestTimeout(IN PI8042_MOUSE_EXTENSION DeviceExtension)
|
||||
{
|
||||
ULARGE_INTEGER Now;
|
||||
|
||||
|
@ -539,14 +530,13 @@ i8042MouInputTestTimeout(
|
|||
}
|
||||
|
||||
/*
|
||||
* Call the customization hook. The ToReturn parameter is about wether
|
||||
* we should go on with the interrupt. The return value is what
|
||||
* we should return (indicating to the system wether someone else
|
||||
* should try to handle the interrupt)
|
||||
*/
|
||||
* Call the customization hook. The ToReturn parameter is about wether
|
||||
* we should go on with the interrupt. The return value is what
|
||||
* we should return (indicating to the system wether someone else
|
||||
* should try to handle the interrupt)
|
||||
*/
|
||||
static BOOLEAN
|
||||
i8042MouCallIsrHook(
|
||||
IN PI8042_MOUSE_EXTENSION DeviceExtension,
|
||||
i8042MouCallIsrHook(IN PI8042_MOUSE_EXTENSION DeviceExtension,
|
||||
IN UCHAR Status,
|
||||
IN UCHAR Input,
|
||||
OUT PBOOLEAN ToReturn)
|
||||
|
@ -577,8 +567,7 @@ i8042MouCallIsrHook(
|
|||
}
|
||||
|
||||
static BOOLEAN
|
||||
i8042MouResetIsr(
|
||||
IN PI8042_MOUSE_EXTENSION DeviceExtension,
|
||||
i8042MouResetIsr(IN PI8042_MOUSE_EXTENSION DeviceExtension,
|
||||
IN UCHAR Status,
|
||||
IN UCHAR Value)
|
||||
{
|
||||
|
@ -828,8 +817,7 @@ i8042MouResetIsr(
|
|||
}
|
||||
|
||||
BOOLEAN NTAPI
|
||||
i8042MouInterruptService(
|
||||
IN PKINTERRUPT Interrupt,
|
||||
i8042MouInterruptService(IN PKINTERRUPT Interrupt,
|
||||
PVOID Context)
|
||||
{
|
||||
PI8042_MOUSE_EXTENSION DeviceExtension;
|
||||
|
|
|
@ -14,26 +14,25 @@
|
|||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
/* This is all pretty confusing. There's more than one way to
|
||||
* disable/enable the keyboard. You can send KBD_ENABLE to the
|
||||
* keyboard, and it will start scanning keys. Sending KBD_DISABLE
|
||||
* will disable the key scanning but also reset the parameters to
|
||||
* defaults.
|
||||
*
|
||||
* You can also send 0xAE to the controller for enabling the
|
||||
* keyboard clock line and 0xAD for disabling it. Then it'll
|
||||
* automatically get turned on at the next command. The last
|
||||
* way is by modifying the bit that drives the clock line in the
|
||||
* 'command byte' of the controller. This is almost, but not quite,
|
||||
* the same as the AE/AD thing. The difference can be used to detect
|
||||
* some really old broken keyboard controllers which I hope won't be
|
||||
* necessary.
|
||||
*
|
||||
* We change the command byte, sending KBD_ENABLE/DISABLE seems to confuse
|
||||
* some kvm switches.
|
||||
*/
|
||||
* disable/enable the keyboard. You can send KBD_ENABLE to the
|
||||
* keyboard, and it will start scanning keys. Sending KBD_DISABLE
|
||||
* will disable the key scanning but also reset the parameters to
|
||||
* defaults.
|
||||
*
|
||||
* You can also send 0xAE to the controller for enabling the
|
||||
* keyboard clock line and 0xAD for disabling it. Then it'll
|
||||
* automatically get turned on at the next command. The last
|
||||
* way is by modifying the bit that drives the clock line in the
|
||||
* 'command byte' of the controller. This is almost, but not quite,
|
||||
* the same as the AE/AD thing. The difference can be used to detect
|
||||
* some really old broken keyboard controllers which I hope won't be
|
||||
* necessary.
|
||||
*
|
||||
* We change the command byte, sending KBD_ENABLE/DISABLE seems to confuse
|
||||
* some kvm switches.
|
||||
*/
|
||||
BOOLEAN
|
||||
i8042ChangeMode(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
i8042ChangeMode(IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
IN UCHAR FlagsToDisable,
|
||||
IN UCHAR FlagsToEnable)
|
||||
{
|
||||
|
@ -72,8 +71,7 @@ i8042ChangeMode(
|
|||
}
|
||||
|
||||
static NTSTATUS
|
||||
i8042BasicDetect(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension)
|
||||
i8042BasicDetect(IN PPORT_DEVICE_EXTENSION DeviceExtension)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
ULONG ResendIterations;
|
||||
|
@ -124,8 +122,7 @@ i8042BasicDetect(
|
|||
}
|
||||
|
||||
static VOID
|
||||
i8042DetectKeyboard(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension)
|
||||
i8042DetectKeyboard(IN PPORT_DEVICE_EXTENSION DeviceExtension)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
|
||||
|
@ -160,8 +157,7 @@ i8042DetectKeyboard(
|
|||
}
|
||||
|
||||
static VOID
|
||||
i8042DetectMouse(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension)
|
||||
i8042DetectMouse(IN PPORT_DEVICE_EXTENSION DeviceExtension)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
UCHAR Value;
|
||||
|
@ -262,8 +258,7 @@ failure:
|
|||
}
|
||||
|
||||
static NTSTATUS
|
||||
i8042ConnectKeyboardInterrupt(
|
||||
IN PI8042_KEYBOARD_EXTENSION DeviceExtension)
|
||||
i8042ConnectKeyboardInterrupt(IN PI8042_KEYBOARD_EXTENSION DeviceExtension)
|
||||
{
|
||||
PPORT_DEVICE_EXTENSION PortDeviceExtension;
|
||||
KIRQL DirqlMax;
|
||||
|
@ -308,8 +303,7 @@ i8042ConnectKeyboardInterrupt(
|
|||
}
|
||||
|
||||
static NTSTATUS
|
||||
i8042ConnectMouseInterrupt(
|
||||
IN PI8042_MOUSE_EXTENSION DeviceExtension)
|
||||
i8042ConnectMouseInterrupt(IN PI8042_MOUSE_EXTENSION DeviceExtension)
|
||||
{
|
||||
PPORT_DEVICE_EXTENSION PortDeviceExtension;
|
||||
KIRQL DirqlMax;
|
||||
|
@ -371,8 +365,7 @@ cleanup:
|
|||
}
|
||||
|
||||
static NTSTATUS
|
||||
EnableInterrupts(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
EnableInterrupts(IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
IN UCHAR FlagsToDisable,
|
||||
IN UCHAR FlagsToEnable)
|
||||
{
|
||||
|
@ -395,8 +388,7 @@ EnableInterrupts(
|
|||
}
|
||||
|
||||
static NTSTATUS
|
||||
StartProcedure(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension)
|
||||
StartProcedure(IN PPORT_DEVICE_EXTENSION DeviceExtension)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
UCHAR FlagsToDisable = 0;
|
||||
|
@ -476,8 +468,7 @@ StartProcedure(
|
|||
}
|
||||
|
||||
static NTSTATUS
|
||||
i8042PnpStartDevice(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
i8042PnpStartDevice(IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PCM_RESOURCE_LIST AllocatedResources,
|
||||
IN PCM_RESOURCE_LIST AllocatedResourcesTranslated)
|
||||
{
|
||||
|
@ -631,8 +622,7 @@ i8042PnpStartDevice(
|
|||
}
|
||||
|
||||
NTSTATUS NTAPI
|
||||
i8042Pnp(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
i8042Pnp(IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
PIO_STACK_LOCATION Stack;
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
VOID
|
||||
i8042MouHandlePs2pp(
|
||||
IN PI8042_MOUSE_EXTENSION DeviceExtension,
|
||||
i8042MouHandlePs2pp(IN PI8042_MOUSE_EXTENSION DeviceExtension,
|
||||
IN UCHAR Input)
|
||||
{
|
||||
UCHAR PktType;
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
VOID
|
||||
i8042Flush(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension)
|
||||
i8042Flush(IN PPORT_DEVICE_EXTENSION DeviceExtension)
|
||||
{
|
||||
UCHAR Ignore;
|
||||
|
||||
|
@ -35,8 +34,7 @@ i8042Flush(
|
|||
}
|
||||
|
||||
BOOLEAN
|
||||
i8042IsrWritePort(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
i8042IsrWritePort(IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
IN UCHAR Value,
|
||||
IN UCHAR SelectCmd OPTIONAL)
|
||||
{
|
||||
|
@ -48,11 +46,10 @@ i8042IsrWritePort(
|
|||
}
|
||||
|
||||
/*
|
||||
* FUNCTION: Read data from port 0x60
|
||||
*/
|
||||
* FUNCTION: Read data from port 0x60
|
||||
*/
|
||||
NTSTATUS
|
||||
i8042ReadData(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
i8042ReadData(IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
IN UCHAR StatusFlags,
|
||||
OUT PUCHAR Data)
|
||||
{
|
||||
|
@ -77,8 +74,7 @@ i8042ReadData(
|
|||
}
|
||||
|
||||
NTSTATUS
|
||||
i8042ReadStatus(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
i8042ReadStatus(IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
OUT PUCHAR Status)
|
||||
{
|
||||
ASSERT(DeviceExtension->ControlPort != NULL);
|
||||
|
@ -87,11 +83,10 @@ i8042ReadStatus(
|
|||
}
|
||||
|
||||
/*
|
||||
* FUNCTION: Read data from data port
|
||||
*/
|
||||
* FUNCTION: Read data from data port
|
||||
*/
|
||||
NTSTATUS
|
||||
i8042ReadDataWait(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
i8042ReadDataWait(IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
OUT PUCHAR Data)
|
||||
{
|
||||
ULONG Counter;
|
||||
|
@ -114,14 +109,13 @@ i8042ReadDataWait(
|
|||
}
|
||||
|
||||
/*
|
||||
* This one reads a value from the port; You don't have to specify
|
||||
* which one, it'll always be from the one you talked to, so one function
|
||||
* is enough this time. Note how MSDN specifies the
|
||||
* WaitForAck parameter to be ignored.
|
||||
*/
|
||||
* This one reads a value from the port; You don't have to specify
|
||||
* which one, it'll always be from the one you talked to, so one function
|
||||
* is enough this time. Note how MSDN specifies the
|
||||
* WaitForAck parameter to be ignored.
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
i8042SynchReadPort(
|
||||
IN PVOID Context,
|
||||
i8042SynchReadPort(IN PVOID Context,
|
||||
OUT PUCHAR Value,
|
||||
IN BOOLEAN WaitForAck)
|
||||
{
|
||||
|
@ -133,12 +127,11 @@ i8042SynchReadPort(
|
|||
}
|
||||
|
||||
/*
|
||||
* These functions are callbacks for filter driver custom
|
||||
* initialization routines.
|
||||
*/
|
||||
* These functions are callbacks for filter driver custom
|
||||
* initialization routines.
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
i8042SynchWritePort(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
i8042SynchWritePort(IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
IN UCHAR Port,
|
||||
IN UCHAR Value,
|
||||
IN BOOLEAN WaitForAck)
|
||||
|
@ -189,11 +182,10 @@ i8042SynchWritePort(
|
|||
}
|
||||
|
||||
/*
|
||||
* FUNCTION: Write data to a port, waiting first for it to become ready
|
||||
*/
|
||||
* FUNCTION: Write data to a port, waiting first for it to become ready
|
||||
*/
|
||||
BOOLEAN
|
||||
i8042Write(
|
||||
IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
i8042Write(IN PPORT_DEVICE_EXTENSION DeviceExtension,
|
||||
IN PUCHAR addr,
|
||||
IN UCHAR data)
|
||||
{
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
NTSTATUS
|
||||
ReadRegistryEntries(
|
||||
IN PUNICODE_STRING RegistryPath,
|
||||
ReadRegistryEntries(IN PUNICODE_STRING RegistryPath,
|
||||
OUT PI8042_SETTINGS Settings)
|
||||
{
|
||||
RTL_QUERY_REGISTRY_TABLE Parameters[17];
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
*/
|
||||
|
||||
/* NOTE:
|
||||
* All this file is a big hack and should be removed one day...
|
||||
*/
|
||||
* All this file is a big hack and should be removed one day...
|
||||
*/
|
||||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
|
@ -23,8 +23,7 @@
|
|||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
BOOLEAN
|
||||
IsFirstStageSetup(
|
||||
VOID)
|
||||
IsFirstStageSetup(VOID)
|
||||
{
|
||||
UNICODE_STRING PathU = RTL_CONSTANT_STRING(L"\\REGISTRY\\MACHINE\\SYSTEM\\Setup");
|
||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
|
@ -47,8 +46,7 @@ IsFirstStageSetup(
|
|||
}
|
||||
|
||||
static VOID NTAPI
|
||||
SendStartDevice(
|
||||
IN PDRIVER_OBJECT DriverObject,
|
||||
SendStartDevice(IN PDRIVER_OBJECT DriverObject,
|
||||
IN PVOID Context,
|
||||
IN ULONG Count)
|
||||
{
|
||||
|
@ -164,8 +162,7 @@ cleanup:
|
|||
}
|
||||
|
||||
static NTSTATUS
|
||||
AddRegistryEntry(
|
||||
IN PCWSTR PortTypeName,
|
||||
AddRegistryEntry(IN PCWSTR PortTypeName,
|
||||
IN PUNICODE_STRING DeviceName,
|
||||
IN PCWSTR RegistryPath)
|
||||
{
|
||||
|
@ -211,8 +208,7 @@ cleanup:
|
|||
}
|
||||
|
||||
NTSTATUS
|
||||
i8042AddLegacyKeyboard(
|
||||
IN PDRIVER_OBJECT DriverObject,
|
||||
i8042AddLegacyKeyboard(IN PDRIVER_OBJECT DriverObject,
|
||||
IN PUNICODE_STRING RegistryPath)
|
||||
{
|
||||
UNICODE_STRING KeyboardName = RTL_CONSTANT_STRING(L"\\Device\\KeyboardPort8042");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue