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 75 #define MS_INPORT_SIGNATURE 0x02 77 #define MS_BUTTON_MIDDLE 0x01 78 #define MS_BUTTON_LEFT 0x02 79 #define MS_BUTTON_RIGHT 0x04 84 #define LOG_BM_DATA 0x00 86 #define LOG_BM_SIGNATURE 0x01 87 #define LOG_SIGNATURE_BYTE 0xA5 89 #define LOG_BM_CONTROL 0x02 90 #define LOG_ENABLE_IRQ 0x00 91 #define LOG_DISABLE_IRQ 0x10 93 #define LOG_READ_X_LOW 0x80 94 #define LOG_READ_X_HIGH 0xA0 95 #define LOG_READ_Y_LOW 0xC0 96 #define LOG_READ_Y_HIGH 0xE0 98 #define LOG_BM_CONFIG 0x03 99 #define LOG_DEFAULT_MODE 0x90 100 #define LOG_CONFIG_BYTE 0x91 102 #define LOG_BUTTON_RIGHT 0x20 103 #define LOG_BUTTON_MIDDLE 0x40 104 #define LOG_BUTTON_LEFT 0x80 118 ULONG DummyInputDataConsumed;
127 RawData = DeviceExtension->
RawData;
220 &DummyInputDataConsumed);
319 if ((DeltaX == 0) && (DeltaY == 0) && (ButtonDiff == 0))
346 switch (DeviceExtension->MouseType)
MOUSE_INPUT_DATA MouseInputData
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
#define MOUSE_MIDDLE_BUTTON_DOWN
#define MOUSE_LEFT_BUTTON_DOWN
PDEVICE_OBJECT ClassDeviceObject
#define UNREFERENCED_PARAMETER(P)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_INTERRUPT_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFINTERRUPT * Interrupt
INPORT_MOUSE_TYPE MouseType
_In_ PDEVICE_OBJECT DeviceObject
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
VOID NTAPI KeReleaseInterruptSpinLock(IN PKINTERRUPT Interrupt, IN KIRQL OldIrql)
PKINTERRUPT InterruptObject
static const TBBUTTON Buttons[]
FORCEINLINE VOID IoRequestDpc(_Inout_ PDEVICE_OBJECT DeviceObject, _In_opt_ PIRP Irp, _In_opt_ __drv_aliasesMem PVOID Context)
#define MOUSE_LEFT_BUTTON_UP
#define MOUSE_MIDDLE_BUTTON_UP
#define MOUSE_RIGHT_BUTTON_DOWN
KIRQL NTAPI KeAcquireInterruptSpinLock(IN PKINTERRUPT Interrupt)
VOID(STDAPICALLTYPE * PSERVICE_CALLBACK_ROUTINE)(IN PVOID NormalContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2, IN OUT PVOID SystemArgument3)
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
_In_ PKSYNCHRONIZE_ROUTINE _In_opt_ __drv_aliasesMem PVOID SynchronizeContext
struct tagContext Context
#define MOUSE_RIGHT_BUTTON_UP