26 MouseInput = DeviceExtension->MouseBuffer + DeviceExtension->MouseInBuffer;
60 switch (DeviceExtension->MouseState)
64 DeviceExtension->MouseLogiBuffer[DeviceExtension->MouseState] =
Input;
65 DeviceExtension->MouseState++;
69 DeviceExtension->MouseLogiBuffer[2] =
Input;
74 if (!(DeviceExtension->MouseLogiBuffer[0] & 0xC0))
77 i8042MouHandle(DeviceExtension, DeviceExtension->MouseLogiBuffer[0]);
78 i8042MouHandle(DeviceExtension, DeviceExtension->MouseLogiBuffer[1]);
79 i8042MouHandle(DeviceExtension, DeviceExtension->MouseLogiBuffer[2]);
89 if (((DeviceExtension->MouseLogiBuffer[0] & 0x48) != 0x48) ||
90 (((DeviceExtension->MouseLogiBuffer[1] & 0x0C) >> 2) !=
91 (DeviceExtension->MouseLogiBuffer[2] & 0x03)))
93 WARN_(I8042PRT,
"Ps2pp packet fails sanity checks\n");
98 PktType = ((DeviceExtension->MouseLogiBuffer[0] & 0x30) >> 2) |
99 ((DeviceExtension->MouseLogiBuffer[1] & 0x30) >> 4);
111 if (DeviceExtension->MouseLogiBuffer[2] & 0x10)
114 if (DeviceExtension->MouseLogiBuffer[2] & 0x20)
117 if (DeviceExtension->MouseLogiBuffer[2] & 0x0F)
120 if (DeviceExtension->MouseLogiBuffer[2] & 0x08)
121 MouseInput->
ButtonData = (DeviceExtension->MouseLogiBuffer[2] & 0x07) - 8;
123 MouseInput->
ButtonData = DeviceExtension->MouseLogiBuffer[2] & 0x07;
128 DeviceExtension->MouseHook.QueueMousePacket(DeviceExtension->MouseHook.CallContext);
138 WARN_(I8042PRT,
"Unexpected input state for ps2pp!\n");
VOID i8042MouHandle(IN PI8042_MOUSE_EXTENSION DeviceExtension, IN UCHAR Output)
VOID i8042MouHandleButtons(IN PI8042_MOUSE_EXTENSION DeviceExtension, IN USHORT Mask)
#define MOUSE_BUTTON_4_DOWN
#define MOUSE_BUTTON_5_DOWN
VOID i8042MouHandlePs2pp(IN PI8042_MOUSE_EXTENSION DeviceExtension, IN UCHAR Input)
#define RtlZeroMemory(Destination, Length)