19#define READ_MOUSE(DeviceExtension, Port) \
20 READ_PORT_UCHAR((DeviceExtension)->IoBase + (Port))
22#define WRITE_MOUSE(DeviceExtension, Port, Data) \
23 WRITE_PORT_UCHAR((DeviceExtension)->IoBase + (Port), (Data))
28#define NEC_BM_DATA 0x00
30#define NEC_BM_CONTROL 0x04
31 #define NEC_INT_ENABLE 0x00
32 #define NEC_INT_DISABLE 0x10
34 #define NEC_READ_X_LOW 0x00
35 #define NEC_READ_X_HIGH 0x20
36 #define NEC_READ_Y_LOW 0x40
37 #define NEC_READ_Y_HIGH 0x60
39 #define NEC_INPUT_CAPTURE 0x00
40 #define NEC_INPUT_HOLD 0x80
42#define NEC_BM_CONFIG 0x06
43 #define NEC_PPI_INT_ENABLE 0x08
44 #define NEC_PPI_INT_DISABLE 0x09
45 #define NEC_PPI_HC_NO_CLEAR 0x0E
46 #define NEC_PPI_HC_CLEAR 0x0F
47 #define NEC_PPI_DEFAULT_MODE 0x93
49#define NEC_BM_INT_RATE 0x4002
50 #define NEC_RATE_120_HZ 0x00
51 #define NEC_RATE_60_HZ 0x01
52 #define NEC_RATE_30_HZ 0x02
53 #define NEC_RATE_15_HZ 0x03
55#define NEC_BM_HIRESO_BASE (PUCHAR)0x61
57#define NEC_BUTTON_RIGHT 0x20
58#define NEC_BUTTON_LEFT 0x80
63#define MS_INPORT_CONTROL 0x00
64 #define INPORT_REG_BTNS 0x00
65 #define INPORT_REG_X 0x01
66 #define INPORT_REG_Y 0x02
67 #define INPORT_REG_MODE 0x07
68 #define INPORT_RESET 0x80
70#define MS_INPORT_DATA 0x01
71 #define INPORT_MODE_IRQ 0x01
72 #define INPORT_MODE_BASE 0x10
73 #define INPORT_MODE_HOLD 0x20
74 #define INPORT_HAS_MOVED 0x40
76#define MS_INPORT_SIGNATURE 0x02
78#define MS_BUTTON_RIGHT 0x01
79#define MS_BUTTON_MIDDLE 0x02
80#define MS_BUTTON_LEFT 0x04
85#define LOG_BM_DATA 0x00
87#define LOG_BM_SIGNATURE 0x01
88 #define LOG_SIGNATURE_BYTE 0xA5
90#define LOG_BM_CONTROL 0x02
91 #define LOG_ENABLE_IRQ 0x00
92 #define LOG_DISABLE_IRQ 0x10
94 #define LOG_READ_X_LOW 0x80
95 #define LOG_READ_X_HIGH 0xA0
96 #define LOG_READ_Y_LOW 0xC0
97 #define LOG_READ_Y_HIGH 0xE0
99#define LOG_BM_CONFIG 0x03
100 #define LOG_DEFAULT_MODE 0x90
101 #define LOG_CONFIG_BYTE 0x91
103#define LOG_BUTTON_RIGHT 0x20
104#define LOG_BUTTON_MIDDLE 0x40
105#define LOG_BUTTON_LEFT 0x80
119 ULONG DummyInputDataConsumed;
128 RawData = DeviceExtension->
RawData;
221 &DummyInputDataConsumed);
329 if ((DeltaX == 0) && (DeltaY == 0) && (ButtonDiff == 0))
356 switch (DeviceExtension->MouseType)
KSERVICE_ROUTINE InPortIsr
KSYNCHRONIZE_ROUTINE InPortStopMouse
KSYNCHRONIZE_ROUTINE InPortStartMouse
IO_DPC_ROUTINE InPortDpcForIsr
VOID(STDAPICALLTYPE * PSERVICE_CALLBACK_ROUTINE)(IN PVOID NormalContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2, IN OUT PVOID SystemArgument3)
static const TBBUTTON Buttons[]
#define UNREFERENCED_PARAMETER(P)
#define MOUSE_LEFT_BUTTON_DOWN
#define MOUSE_LEFT_BUTTON_UP
#define MOUSE_MIDDLE_BUTTON_DOWN
#define MOUSE_RIGHT_BUTTON_UP
#define MOUSE_MIDDLE_BUTTON_UP
#define MOUSE_RIGHT_BUTTON_DOWN
KIRQL NTAPI KeAcquireInterruptSpinLock(IN PKINTERRUPT Interrupt)
VOID NTAPI KeReleaseInterruptSpinLock(IN PKINTERRUPT Interrupt, IN KIRQL OldIrql)
INPORT_MOUSE_TYPE MouseType
MOUSE_INPUT_DATA MouseInputData
PDEVICE_OBJECT ClassDeviceObject
PKINTERRUPT InterruptObject
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_INTERRUPT_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFINTERRUPT * Interrupt
FORCEINLINE VOID IoRequestDpc(_Inout_ PDEVICE_OBJECT DeviceObject, _In_opt_ PIRP Irp, _In_opt_ __drv_aliasesMem PVOID Context)
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
_In_ PKSYNCHRONIZE_ROUTINE _In_opt_ __drv_aliasesMem PVOID SynchronizeContext