mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:57:35 +00:00
Kernel: Detect 5-button PS/2 mouse if present :^)
The detection works very similarly to how we detect a mouse wheel, just another magical sequence of "set sample rate" requests to the mouse followed by an ID check.
This commit is contained in:
parent
c00ff4ba62
commit
c5882d3a18
3 changed files with 47 additions and 19 deletions
|
@ -68,12 +68,15 @@ private:
|
|||
u8 wait_then_read(u8 port);
|
||||
void parse_data_packet();
|
||||
void expect_ack();
|
||||
void set_sample_rate(u8);
|
||||
u8 get_device_id();
|
||||
|
||||
bool m_device_present { false };
|
||||
CircularQueue<MousePacket, 100> m_queue;
|
||||
u8 m_data_state { 0 };
|
||||
u8 m_data[4];
|
||||
bool m_has_wheel { false };
|
||||
bool m_has_five_buttons { false };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue