mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:57:35 +00:00
Kernel+WindowServer: Move mouse input signal parsing to kernel driver.
It was silly for the WindowServer to have to know anything about the format of PS/2 mouse packets. This patch also enables use of the middle mouse button.
This commit is contained in:
parent
1cc32ebc7e
commit
26a9d662f4
6 changed files with 74 additions and 42 deletions
|
@ -1,7 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <Kernel/CharacterDevice.h>
|
||||
#include "IRQHandler.h"
|
||||
#include <Kernel/MousePacket.h>
|
||||
#include <Kernel/IRQHandler.h>
|
||||
|
||||
class PS2MouseDevice final : public IRQHandler, public CharacterDevice {
|
||||
public:
|
||||
|
@ -30,8 +31,9 @@ private:
|
|||
byte mouse_read();
|
||||
void wait_then_write(byte port, byte data);
|
||||
byte wait_then_read(byte port);
|
||||
void parse_data_packet();
|
||||
|
||||
CircularQueue<byte, 600> m_queue;
|
||||
CircularQueue<MousePacket, 100> m_queue;
|
||||
byte m_data_state { 0 };
|
||||
signed_byte m_data[3];
|
||||
byte m_data[3];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue