ReactOS  0.4.13-dev-257-gfabbd7c
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:
I8042_SLEEP_SYS_BUTTON | \
I8042_WAKE_SYS_BUTTON)
#define I8042_POWER_SYS_BUTTON
Definition: ntdd8042.h:54

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 137 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 159 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 167 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 186 of file ntdd8042.h.

◆ PI8042_QUEUE_PACKET

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

Definition at line 142 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 146 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 152 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
Definition: ntdd8042.h:75
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  {
114  EnableWheel,
127  I8042ReservedMinimum = 1000
enum _MOUSE_RESET_SUBSTATE * PMOUSE_RESET_SUBSTATE
enum _MOUSE_RESET_SUBSTATE MOUSE_RESET_SUBSTATE

◆ _MOUSE_STATE

Enumerator
MouseIdle 
XMovement 
YMovement 
ZMovement 
MouseExpectingACK 
MouseResetting 

Definition at line 79 of file ntdd8042.h.

79  {
80  MouseIdle,
81  XMovement,
82  YMovement,
83  ZMovement,
enum _MOUSE_STATE MOUSE_STATE
enum _MOUSE_STATE * PMOUSE_STATE

◆ _TRANSMIT_STATE

Enumerator
Idle 
SendingBytes 

Definition at line 61 of file ntdd8042.h.

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