ReactOS 0.4.15-dev-7906-g1b85a5f
ntdd8042.h File Reference
#include "ntddkbd.h"
#include "ntddmou.h"
Include dependency graph for ntdd8042.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _OUTPUT_PACKET
 
struct  _INTERNAL_I8042_START_INFORMATION
 
struct  _INTERNAL_I8042_HOOK_KEYBOARD
 
struct  _INTERNAL_I8042_HOOK_MOUSE
 

Macros

#define IOCTL_INTERNAL_I8042_CONTROLLER_WRITE_BUFFER    CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0FF2, METHOD_NEITHER, FILE_ANY_ACCESS)
 
#define IOCTL_INTERNAL_I8042_HOOK_KEYBOARD    CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0FF0, METHOD_NEITHER, FILE_ANY_ACCESS)
 
#define IOCTL_INTERNAL_I8042_KEYBOARD_START_INFORMATION    CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0FF3, METHOD_NEITHER, FILE_ANY_ACCESS)
 
#define IOCTL_INTERNAL_I8042_KEYBOARD_WRITE_BUFFER    CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0FF1, METHOD_NEITHER, FILE_ANY_ACCESS)
 
#define IOCTL_INTERNAL_I8042_HOOK_MOUSE    CTL_CODE(FILE_DEVICE_MOUSE, 0x0FF0, METHOD_NEITHER, FILE_ANY_ACCESS)
 
#define IOCTL_INTERNAL_I8042_MOUSE_START_INFORMATION    CTL_CODE(FILE_DEVICE_MOUSE, 0x0FF3, METHOD_NEITHER, FILE_ANY_ACCESS)
 
#define IOCTL_INTERNAL_I8042_MOUSE_WRITE_BUFFER    CTL_CODE(FILE_DEVICE_MOUSE, 0x0FF1, METHOD_NEITHER, FILE_ANY_ACCESS)
 
#define I8042_POWER_SYS_BUTTON   0x0001
 
#define I8042_SLEEP_SYS_BUTTON   0x0002
 
#define I8042_WAKE_SYS_BUTTON   0x0004
 
#define I8042_SYS_BUTTONS
 

Typedefs

typedef enum _TRANSMIT_STATE TRANSMIT_STATE
 
typedef struct _OUTPUT_PACKET OUTPUT_PACKET
 
typedef struct _OUTPUT_PACKETPOUTPUT_PACKET
 
typedef enum _KEYBOARD_SCAN_STATE KEYBOARD_SCAN_STATE
 
typedef enum _KEYBOARD_SCAN_STATEPKEYBOARD_SCAN_STATE
 
typedef enum _MOUSE_STATE MOUSE_STATE
 
typedef enum _MOUSE_STATEPMOUSE_STATE
 
typedef enum _MOUSE_RESET_SUBSTATE MOUSE_RESET_SUBSTATE
 
typedef enum _MOUSE_RESET_SUBSTATEPMOUSE_RESET_SUBSTATE
 
typedef struct _INTERNAL_I8042_START_INFORMATION INTERNAL_I8042_START_INFORMATION
 
typedef struct _INTERNAL_I8042_START_INFORMATIONPINTERNAL_I8042_START_INFORMATION
 
typedef VOID(NTAPIPI8042_ISR_WRITE_PORT) (IN PVOID Context, IN UCHAR Value)
 
typedef VOID(NTAPIPI8042_QUEUE_PACKET) (IN PVOID Context)
 
typedef NTSTATUS(NTAPIPI8042_SYNCH_READ_PORT) (IN PVOID Context, OUT PUCHAR Value, IN BOOLEAN WaitForACK)
 
typedef NTSTATUS(NTAPIPI8042_SYNCH_WRITE_PORT) (IN PVOID Context, IN UCHAR Value, IN BOOLEAN WaitForACK)
 
typedef NTSTATUS(NTAPIPI8042_KEYBOARD_INITIALIZATION_ROUTINE) (IN PVOID InitializationContext, IN PVOID SynchFuncContext, IN PI8042_SYNCH_READ_PORT ReadPort, IN PI8042_SYNCH_WRITE_PORT WritePort, OUT PBOOLEAN TurnTranslationOn)
 
typedef BOOLEAN(NTAPIPI8042_KEYBOARD_ISR) (PVOID IsrContext, PKEYBOARD_INPUT_DATA CurrentInput, POUTPUT_PACKET CurrentOutput, UCHAR StatusByte, PUCHAR Byte, PBOOLEAN ContinueProcessing, PKEYBOARD_SCAN_STATE ScanState)
 
typedef struct _INTERNAL_I8042_HOOK_KEYBOARD INTERNAL_I8042_HOOK_KEYBOARD
 
typedef struct _INTERNAL_I8042_HOOK_KEYBOARDPINTERNAL_I8042_HOOK_KEYBOARD
 
typedef BOOLEAN(NTAPIPI8042_MOUSE_ISR) (PVOID IsrContext, PMOUSE_INPUT_DATA CurrentInput, POUTPUT_PACKET CurrentOutput, UCHAR StatusByte, PUCHAR Byte, PBOOLEAN ContinueProcessing, PMOUSE_STATE MouseState, PMOUSE_RESET_SUBSTATE ResetSubState)
 
typedef struct _INTERNAL_I8042_HOOK_MOUSE INTERNAL_I8042_HOOK_MOUSE
 
typedef struct _INTERNAL_I8042_HOOK_MOUSEPINTERNAL_I8042_HOOK_MOUSE
 

Enumerations

enum  _TRANSMIT_STATE { Idle = 0 , SendingBytes }
 
enum  _KEYBOARD_SCAN_STATE { Normal , GotE0 , GotE1 }
 
enum  _MOUSE_STATE {
  MouseIdle , XMovement , YMovement , ZMovement ,
  MouseExpectingACK , MouseResetting
}
 
enum  _MOUSE_RESET_SUBSTATE {
  ExpectingReset , ExpectingResetId , ExpectingGetDeviceIdACK , ExpectingGetDeviceIdValue ,
  ExpectingSetResolutionDefaultACK , ExpectingSetResolutionDefaultValueACK , ExpectingSetResolutionACK , ExpectingSetResolutionValueACK ,
  ExpectingSetScaling1to1ACK , ExpectingSetScaling1to1ACK2 , ExpectingSetScaling1to1ACK3 , ExpectingReadMouseStatusACK ,
  ExpectingReadMouseStatusByte1 , ExpectingReadMouseStatusByte2 , ExpectingReadMouseStatusByte3 , StartPnPIdDetection ,
  ExpectingLoopSetSamplingRateACK , ExpectingLoopSetSamplingRateValueACK , ExpectingPnpIdByte1 , ExpectingPnpIdByte2 ,
  ExpectingPnpIdByte3 , ExpectingPnpIdByte4 , ExpectingPnpIdByte5 , ExpectingPnpIdByte6 ,
  ExpectingPnpIdByte7 , EnableWheel , Enable5Buttons , ExpectingGetDeviceId2ACK ,
  ExpectingGetDeviceId2Value , ExpectingSetSamplingRateACK , ExpectingSetSamplingRateValueACK , ExpectingEnableACK ,
  ExpectingFinalResolutionACK , ExpectingFinalResolutionValueACK , ExpectingGetDeviceIdDetectACK , ExpectingGetDeviceIdDetectValue ,
  CustomHookStateMinimum = 100 , CustomHookStateMaximum = 999 , I8042ReservedMinimum = 1000
}
 

Macro Definition Documentation

◆ I8042_POWER_SYS_BUTTON

#define I8042_POWER_SYS_BUTTON   0x0001

Definition at line 54 of file ntdd8042.h.

◆ I8042_SLEEP_SYS_BUTTON

#define I8042_SLEEP_SYS_BUTTON   0x0002

Definition at line 55 of file ntdd8042.h.

◆ I8042_SYS_BUTTONS

#define I8042_SYS_BUTTONS
Value:
#define I8042_POWER_SYS_BUTTON
Definition: ntdd8042.h:54
#define I8042_WAKE_SYS_BUTTON
Definition: ntdd8042.h:56
#define I8042_SLEEP_SYS_BUTTON
Definition: ntdd8042.h:55

Definition at line 57 of file ntdd8042.h.

◆ I8042_WAKE_SYS_BUTTON

#define I8042_WAKE_SYS_BUTTON   0x0004

Definition at line 56 of file ntdd8042.h.

◆ IOCTL_INTERNAL_I8042_CONTROLLER_WRITE_BUFFER

#define IOCTL_INTERNAL_I8042_CONTROLLER_WRITE_BUFFER    CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0FF2, METHOD_NEITHER, FILE_ANY_ACCESS)

Definition at line 33 of file ntdd8042.h.

◆ IOCTL_INTERNAL_I8042_HOOK_KEYBOARD

#define IOCTL_INTERNAL_I8042_HOOK_KEYBOARD    CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0FF0, METHOD_NEITHER, FILE_ANY_ACCESS)

Definition at line 36 of file ntdd8042.h.

◆ IOCTL_INTERNAL_I8042_HOOK_MOUSE

#define IOCTL_INTERNAL_I8042_HOOK_MOUSE    CTL_CODE(FILE_DEVICE_MOUSE, 0x0FF0, METHOD_NEITHER, FILE_ANY_ACCESS)

Definition at line 45 of file ntdd8042.h.

◆ IOCTL_INTERNAL_I8042_KEYBOARD_START_INFORMATION

#define IOCTL_INTERNAL_I8042_KEYBOARD_START_INFORMATION    CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0FF3, METHOD_NEITHER, FILE_ANY_ACCESS)

Definition at line 39 of file ntdd8042.h.

◆ IOCTL_INTERNAL_I8042_KEYBOARD_WRITE_BUFFER

#define IOCTL_INTERNAL_I8042_KEYBOARD_WRITE_BUFFER    CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0FF1, METHOD_NEITHER, FILE_ANY_ACCESS)

Definition at line 42 of file ntdd8042.h.

◆ IOCTL_INTERNAL_I8042_MOUSE_START_INFORMATION

#define IOCTL_INTERNAL_I8042_MOUSE_START_INFORMATION    CTL_CODE(FILE_DEVICE_MOUSE, 0x0FF3, METHOD_NEITHER, FILE_ANY_ACCESS)

Definition at line 48 of file ntdd8042.h.

◆ IOCTL_INTERNAL_I8042_MOUSE_WRITE_BUFFER

#define IOCTL_INTERNAL_I8042_MOUSE_WRITE_BUFFER    CTL_CODE(FILE_DEVICE_MOUSE, 0x0FF1, METHOD_NEITHER, FILE_ANY_ACCESS)

Definition at line 51 of file ntdd8042.h.

Typedef Documentation

◆ INTERNAL_I8042_HOOK_KEYBOARD

◆ INTERNAL_I8042_HOOK_MOUSE

◆ INTERNAL_I8042_START_INFORMATION

◆ KEYBOARD_SCAN_STATE

◆ MOUSE_RESET_SUBSTATE

◆ MOUSE_STATE

◆ OUTPUT_PACKET

◆ PI8042_ISR_WRITE_PORT

typedef VOID(NTAPI * PI8042_ISR_WRITE_PORT) (IN PVOID Context, IN UCHAR Value)

Definition at line 136 of file ntdd8042.h.

◆ PI8042_KEYBOARD_INITIALIZATION_ROUTINE

typedef NTSTATUS(NTAPI * PI8042_KEYBOARD_INITIALIZATION_ROUTINE) (IN PVOID InitializationContext, IN PVOID SynchFuncContext, IN PI8042_SYNCH_READ_PORT ReadPort, IN PI8042_SYNCH_WRITE_PORT WritePort, OUT PBOOLEAN TurnTranslationOn)

Definition at line 158 of file ntdd8042.h.

◆ PI8042_KEYBOARD_ISR

typedef BOOLEAN(NTAPI * PI8042_KEYBOARD_ISR) (PVOID IsrContext, PKEYBOARD_INPUT_DATA CurrentInput, POUTPUT_PACKET CurrentOutput, UCHAR StatusByte, PUCHAR Byte, PBOOLEAN ContinueProcessing, PKEYBOARD_SCAN_STATE ScanState)

Definition at line 166 of file ntdd8042.h.

◆ PI8042_MOUSE_ISR

typedef BOOLEAN(NTAPI * PI8042_MOUSE_ISR) (PVOID IsrContext, PMOUSE_INPUT_DATA CurrentInput, POUTPUT_PACKET CurrentOutput, UCHAR StatusByte, PUCHAR Byte, PBOOLEAN ContinueProcessing, PMOUSE_STATE MouseState, PMOUSE_RESET_SUBSTATE ResetSubState)

Definition at line 185 of file ntdd8042.h.

◆ PI8042_QUEUE_PACKET

typedef VOID(NTAPI * PI8042_QUEUE_PACKET) (IN PVOID Context)

Definition at line 141 of file ntdd8042.h.

◆ PI8042_SYNCH_READ_PORT

typedef NTSTATUS(NTAPI * PI8042_SYNCH_READ_PORT) (IN PVOID Context, OUT PUCHAR Value, IN BOOLEAN WaitForACK)

Definition at line 145 of file ntdd8042.h.

◆ PI8042_SYNCH_WRITE_PORT

typedef NTSTATUS(NTAPI * PI8042_SYNCH_WRITE_PORT) (IN PVOID Context, IN UCHAR Value, IN BOOLEAN WaitForACK)

Definition at line 151 of file ntdd8042.h.

◆ PINTERNAL_I8042_HOOK_KEYBOARD

◆ PINTERNAL_I8042_HOOK_MOUSE

◆ PINTERNAL_I8042_START_INFORMATION

◆ PKEYBOARD_SCAN_STATE

◆ PMOUSE_RESET_SUBSTATE

◆ PMOUSE_STATE

◆ POUTPUT_PACKET

◆ TRANSMIT_STATE

Enumeration Type Documentation

◆ _KEYBOARD_SCAN_STATE

Enumerator
Normal 
GotE0 
GotE1 

Definition at line 73 of file ntdd8042.h.

73 {
74 Normal,
75 GotE0,
76 GotE1
@ GotE0
Definition: ntdd8042.h:75
@ Normal
Definition: ntdd8042.h:74
@ GotE1
Definition: ntdd8042.h:76
enum _KEYBOARD_SCAN_STATE KEYBOARD_SCAN_STATE
enum _KEYBOARD_SCAN_STATE * PKEYBOARD_SCAN_STATE

◆ _MOUSE_RESET_SUBSTATE

Enumerator
ExpectingReset 
ExpectingResetId 
ExpectingGetDeviceIdACK 
ExpectingGetDeviceIdValue 
ExpectingSetResolutionDefaultACK 
ExpectingSetResolutionDefaultValueACK 
ExpectingSetResolutionACK 
ExpectingSetResolutionValueACK 
ExpectingSetScaling1to1ACK 
ExpectingSetScaling1to1ACK2 
ExpectingSetScaling1to1ACK3 
ExpectingReadMouseStatusACK 
ExpectingReadMouseStatusByte1 
ExpectingReadMouseStatusByte2 
ExpectingReadMouseStatusByte3 
StartPnPIdDetection 
ExpectingLoopSetSamplingRateACK 
ExpectingLoopSetSamplingRateValueACK 
ExpectingPnpIdByte1 
ExpectingPnpIdByte2 
ExpectingPnpIdByte3 
ExpectingPnpIdByte4 
ExpectingPnpIdByte5 
ExpectingPnpIdByte6 
ExpectingPnpIdByte7 
EnableWheel 
Enable5Buttons 
ExpectingGetDeviceId2ACK 
ExpectingGetDeviceId2Value 
ExpectingSetSamplingRateACK 
ExpectingSetSamplingRateValueACK 
ExpectingEnableACK 
ExpectingFinalResolutionACK 
ExpectingFinalResolutionValueACK 
ExpectingGetDeviceIdDetectACK 
ExpectingGetDeviceIdDetectValue 
CustomHookStateMinimum 
CustomHookStateMaximum 
I8042ReservedMinimum 

Definition at line 88 of file ntdd8042.h.

88 {
enum _MOUSE_RESET_SUBSTATE MOUSE_RESET_SUBSTATE
enum _MOUSE_RESET_SUBSTATE * PMOUSE_RESET_SUBSTATE
@ ExpectingGetDeviceIdDetectACK
Definition: ntdd8042.h:123
@ ExpectingPnpIdByte6
Definition: ntdd8042.h:112
@ ExpectingLoopSetSamplingRateValueACK
Definition: ntdd8042.h:106
@ ExpectingReadMouseStatusACK
Definition: ntdd8042.h:100
@ ExpectingPnpIdByte7
Definition: ntdd8042.h:113
@ ExpectingGetDeviceId2ACK
Definition: ntdd8042.h:116
@ ExpectingSetResolutionValueACK
Definition: ntdd8042.h:96
@ ExpectingReadMouseStatusByte1
Definition: ntdd8042.h:101
@ ExpectingSetScaling1to1ACK3
Definition: ntdd8042.h:99
@ ExpectingPnpIdByte1
Definition: ntdd8042.h:107
@ ExpectingPnpIdByte2
Definition: ntdd8042.h:108
@ Enable5Buttons
Definition: ntdd8042.h:115
@ I8042ReservedMinimum
Definition: ntdd8042.h:127
@ ExpectingGetDeviceIdValue
Definition: ntdd8042.h:92
@ StartPnPIdDetection
Definition: ntdd8042.h:104
@ ExpectingFinalResolutionValueACK
Definition: ntdd8042.h:122
@ ExpectingSetSamplingRateValueACK
Definition: ntdd8042.h:119
@ ExpectingPnpIdByte3
Definition: ntdd8042.h:109
@ ExpectingSetResolutionDefaultACK
Definition: ntdd8042.h:93
@ ExpectingSetScaling1to1ACK
Definition: ntdd8042.h:97
@ ExpectingReadMouseStatusByte3
Definition: ntdd8042.h:103
@ ExpectingPnpIdByte4
Definition: ntdd8042.h:110
@ ExpectingSetResolutionDefaultValueACK
Definition: ntdd8042.h:94
@ ExpectingReset
Definition: ntdd8042.h:89
@ ExpectingLoopSetSamplingRateACK
Definition: ntdd8042.h:105
@ ExpectingReadMouseStatusByte2
Definition: ntdd8042.h:102
@ ExpectingSetScaling1to1ACK2
Definition: ntdd8042.h:98
@ ExpectingGetDeviceIdDetectValue
Definition: ntdd8042.h:124
@ ExpectingPnpIdByte5
Definition: ntdd8042.h:111
@ ExpectingGetDeviceId2Value
Definition: ntdd8042.h:117
@ ExpectingSetResolutionACK
Definition: ntdd8042.h:95
@ ExpectingSetSamplingRateACK
Definition: ntdd8042.h:118
@ ExpectingGetDeviceIdACK
Definition: ntdd8042.h:91
@ ExpectingEnableACK
Definition: ntdd8042.h:120
@ CustomHookStateMinimum
Definition: ntdd8042.h:125
@ CustomHookStateMaximum
Definition: ntdd8042.h:126
@ ExpectingResetId
Definition: ntdd8042.h:90
@ ExpectingFinalResolutionACK
Definition: ntdd8042.h:121
@ EnableWheel
Definition: ntdd8042.h:114

◆ _MOUSE_STATE

Enumerator
MouseIdle 
XMovement 
YMovement 
ZMovement 
MouseExpectingACK 
MouseResetting 

Definition at line 79 of file ntdd8042.h.

79 {
enum _MOUSE_STATE * PMOUSE_STATE
enum _MOUSE_STATE MOUSE_STATE
@ MouseResetting
Definition: ntdd8042.h:85
@ XMovement
Definition: ntdd8042.h:81
@ YMovement
Definition: ntdd8042.h:82
@ MouseExpectingACK
Definition: ntdd8042.h:84
@ ZMovement
Definition: ntdd8042.h:83
@ MouseIdle
Definition: ntdd8042.h:80

◆ _TRANSMIT_STATE

Enumerator
Idle 
SendingBytes 

Definition at line 61 of file ntdd8042.h.

61 {
62 Idle = 0,
enum _TRANSMIT_STATE TRANSMIT_STATE
@ SendingBytes
Definition: ntdd8042.h:63
@ Idle
Definition: ntdd8042.h:62