12#define I8042PRT_TAG '2408'
60#define WHEEL_DELTA 120
68#define KEYBOARD_PRESENT 0x01
69#define KEYBOARD_CONNECTED 0x02
70#define KEYBOARD_STARTED 0x04
71#define KEYBOARD_INITIALIZED 0x08
72#define MOUSE_PRESENT 0x10
73#define MOUSE_CONNECTED 0x20
74#define MOUSE_STARTED 0x40
75#define MOUSE_INITIALIZED 0x80
211#define MAX(a, b) ((a) >= (b) ? (a) : (b))
213#define KEYBOARD_POWER_CODE 0x5E
214#define KEYBOARD_SLEEP_CODE 0x5F
215#define KEYBOARD_WAKE_CODE 0x63
221#define KBD_READ_MODE 0x20
222#define KBD_WRITE_MODE 0x60
223#define MOUSE_ENAB 0xA8
224#define MOUSE_LINE_TEST 0xA9
225#define CTRL_SELF_TEST 0xAA
226#define KBD_CLK_DISABLE 0xAD
227#define KBD_CLK_ENABLE 0xAE
228#define CTRL_WRITE_MOUSE 0xD4
234#define KBD_CMD_SET_LEDS 0xED
235#define KBD_CMD_GET_ID 0xF2
241#define KBD_SELF_TEST_OK 0x55
244#define KBD_RESEND 0xFE
259#define CCB_KBD_INT_ENAB 0x01
260#define CCB_MOUSE_INT_ENAB 0x02
261#define CCB_SYSTEM_FLAG 0x04
262#define CCB_KBD_DISAB 0x10
263#define CCB_MOUSE_DISAB 0x20
264#define CCB_TRANSLATE 0x40
270#define KBD_LED_SCROLL 0x01
271#define KBD_LED_NUM 0x02
272#define KBD_LED_CAPS 0x04
279#define MOU_CMD_RESET 0xFF
285#define MOUSE_ACK 0xFA
286#define MOUSE_ERROR 0xFC
287#define MOUSE_NACK 0xFE
403#define i8042ReadKeyboardData(DeviceExtension, Data) \
404 i8042ReadData(DeviceExtension, KBD_OBF, Data)
405#define i8042ReadMouseData(DeviceExtension, Data) \
406 i8042ReadData(DeviceExtension, MOU_OBF, Data)
#define _Dispatch_type_(a)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum const GLvoid * addr
struct _I8042_HOOK_WORKITEM I8042_HOOK_WORKITEM
struct _FDO_DEVICE_EXTENSION FDO_DEVICE_EXTENSION
struct _I8042_HOOK_WORKITEM * PI8042_HOOK_WORKITEM
NTSTATUS i8042StartPacket(IN PPORT_DEVICE_EXTENSION DeviceExtension, IN PFDO_DEVICE_EXTENSION FdoDeviceExtension, IN PUCHAR Bytes, IN ULONG ByteCount, IN PIRP Irp)
NTSTATUS NTAPI i8042SynchWritePortKbd(IN PVOID Context, IN UCHAR Value, IN BOOLEAN WaitForAck)
NTSTATUS i8042ReadDataWait(IN PPORT_DEVICE_EXTENSION DeviceExtension, OUT PUCHAR Data)
DRIVER_DISPATCH i8042KbdDeviceControl
VOID i8042Flush(IN PPORT_DEVICE_EXTENSION DeviceExtension)
enum _MOUSE_TIMEOUT_STATE MOUSE_TIMEOUT_STATE
struct _PORT_DEVICE_EXTENSION * PPORT_DEVICE_EXTENSION
NTSTATUS i8042ReadData(IN PPORT_DEVICE_EXTENSION DeviceExtension, IN UCHAR StatusFlags, OUT PUCHAR Data)
DRIVER_DISPATCH i8042KbdInternalDeviceControl
DRIVER_STARTIO i8042KbdStartIo
struct _FDO_DEVICE_EXTENSION * PFDO_DEVICE_EXTENSION
KSERVICE_ROUTINE i8042MouInterruptService
NTSTATUS i8042MouInitialize(IN PI8042_MOUSE_EXTENSION DeviceExtension)
KSERVICE_ROUTINE i8042KbdInterruptService
DRIVER_DISPATCH i8042MouInternalDeviceControl
NTSTATUS DuplicateUnicodeString(IN ULONG Flags, IN PCUNICODE_STRING SourceString, OUT PUNICODE_STRING DestinationString)
struct _I8042_MOUSE_EXTENSION * PI8042_MOUSE_EXTENSION
NTSTATUS NTAPI i8042SynchReadPort(IN PVOID Context, OUT PUCHAR Value, IN BOOLEAN WaitForAck)
IO_WORKITEM_ROUTINE i8042SendHookWorkItem
VOID i8042MouHandlePs2pp(IN PI8042_MOUSE_EXTENSION DeviceExtension, IN UCHAR Input)
BOOLEAN i8042PacketIsr(IN PPORT_DEVICE_EXTENSION DeviceExtension, IN UCHAR Output)
BOOLEAN i8042IsrWritePort(IN PPORT_DEVICE_EXTENSION DeviceExtension, IN UCHAR Value, IN UCHAR SelectCmd OPTIONAL)
enum _I8042_MOUSE_TYPE I8042_MOUSE_TYPE
struct _I8042_DRIVER_EXTENSION I8042_DRIVER_EXTENSION
enum _I8042_MOUSE_TYPE * PI8042_MOUSE_TYPE
NTSTATUS ReadRegistryEntries(IN PUNICODE_STRING RegistryPath, OUT PI8042_SETTINGS Settings)
VOID i8042MouHandle(IN PI8042_MOUSE_EXTENSION DeviceExtension, IN UCHAR Output)
struct _I8042_MOUSE_EXTENSION I8042_MOUSE_EXTENSION
BOOLEAN i8042ChangeMode(IN PPORT_DEVICE_EXTENSION DeviceExtension, IN UCHAR FlagsToDisable, IN UCHAR FlagsToEnable)
struct _I8042_KEYBOARD_EXTENSION * PI8042_KEYBOARD_EXTENSION
NTSTATUS NTAPI i8042SynchWritePort(IN PPORT_DEVICE_EXTENSION DeviceExtension, IN UCHAR Port, IN UCHAR Value, IN BOOLEAN WaitForAck)
VOID NTAPI i8042InitializeHwHacks(VOID)
DRIVER_DISPATCH ForwardIrpAndForget
struct _I8042_DRIVER_EXTENSION * PI8042_DRIVER_EXTENSION
struct _INTERRUPT_DATA INTERRUPT_DATA
NTSTATUS i8042ReadStatus(IN PPORT_DEVICE_EXTENSION DeviceExtension, OUT PUCHAR Status)
struct _I8042_SETTINGS * PI8042_SETTINGS
enum _MOUSE_TIMEOUT_STATE * PMOUSE_TIMEOUT_STATE
struct _I8042_KEYBOARD_EXTENSION I8042_KEYBOARD_EXTENSION
enum _I8042_DEVICE_TYPE * PI8042_DEVICE_TYPE
DRIVER_ADD_DEVICE i8042AddDevice
struct _PORT_DEVICE_EXTENSION PORT_DEVICE_EXTENSION
enum _I8042_DEVICE_TYPE I8042_DEVICE_TYPE
struct _I8042_SETTINGS I8042_SETTINGS
struct _INTERRUPT_DATA * PINTERRUPT_DATA
BOOLEAN i8042Write(IN PPORT_DEVICE_EXTENSION DeviceExtension, IN PUCHAR addr, IN UCHAR data)
VOID i8042MouHandleButtons(IN PI8042_MOUSE_EXTENSION DeviceExtension, IN USHORT Mask)
_Out_ _Inout_ POEM_STRING _In_ PCUNICODE_STRING SourceString
_Out_ _Inout_ POEM_STRING DestinationString
DRIVER_DISPATCH(nfs41_FsdDispatch)
enum _MOUSE_RESET_SUBSTATE MOUSE_RESET_SUBSTATE
enum _MOUSE_STATE MOUSE_STATE
enum _KEYBOARD_SCAN_STATE KEYBOARD_SCAN_STATE
enum _KINTERRUPT_MODE KINTERRUPT_MODE
PULONG MinorVersion OPTIONAL
PDEVICE_OBJECT LowerDevice
PPORT_DEVICE_EXTENSION PortDeviceExtension
KSPIN_LOCK DeviceListLock
LIST_ENTRY DeviceListHead
UNICODE_STRING RegistryPath
PORT_DEVICE_EXTENSION Port
CONNECT_DATA KeyboardData
PIO_WORKITEM DebugWorkItem
KEYBOARD_ATTRIBUTES KeyboardAttributes
FDO_DEVICE_EXTENSION Common
INTERNAL_I8042_HOOK_KEYBOARD KeyboardHook
KEYBOARD_SCAN_STATE KeyboardScanState
UNICODE_STRING PowerInterfaceName
KEYBOARD_INDICATOR_PARAMETERS KeyboardIndicators
PKEYBOARD_INPUT_DATA KeyboardBuffer
PIO_WORKITEM PowerWorkItem
ULARGE_INTEGER MousePacketStartTime
FDO_DEVICE_EXTENSION Common
MOUSE_ATTRIBUTES MouseAttributes
I8042_MOUSE_TYPE MouseType
MOUSE_TIMEOUT_STATE MouseTimeoutState
PMOUSE_INPUT_DATA MouseBuffer
BOOLEAN MouseTimeoutActive
INTERNAL_I8042_HOOK_MOUSE MouseHook
MOUSE_RESET_SUBSTATE MouseResetState
ULONG OverrideKeyboardSubtype
UNICODE_STRING KeyboardDeviceBaseName
ULONG OverrideKeyboardType
ULONG PollStatusIterations
UNICODE_STRING PointerDeviceBaseName
ULONG PollingIterationsMaximum
ULONG KeyboardDataQueueSize
KINTERRUPT_MODE InterruptMode
INTERRUPT_DATA KeyboardInterrupt
PKINTERRUPT HighestDIRQLInterrupt
PDEVICE_OBJECT CurrentIrpDevice
PI8042_MOUSE_EXTENSION MouseExtension
INTERRUPT_DATA MouseInterrupt
PI8042_KEYBOARD_EXTENSION KeyboardExtension
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS Settings
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
_Must_inspect_result_ _In_ ULONG Flags
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _In_ LARGE_INTEGER ByteCount