Skip to main content

Module mouse

Module mouse 

Source
Expand description

PS/2 Mouse driver (IRQ12)

Supports standard 3-byte PS/2 mouse and IntelliMouse (4-byte, scroll wheel). Initialization follows the standard PS/2 controller protocol via I/O ports 0x60 (data) and 0x64 (command/status).

Structs§

MouseEvent
A decoded mouse event.

Statics§

MOUSE_READY
Mouse is initialized and streaming

Functions§

handle_irq
Called from the IDT IRQ12 handler (interrupt context, interrupts disabled).
has_event
Returns true if at least one mouse event is pending.
init
Initialize the PS/2 mouse.
mouse_pos
Returns the current accumulated mouse position (pixel coordinates).
read_event
Dequeue the oldest mouse event (non-blocking).