1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:57:46 +00:00

Use a CircularQueue for the PS/2 mouse driver.

This commit is contained in:
Andreas Kling 2019-01-16 01:52:39 +01:00
parent 8ad2dfb6e1
commit 09ba129bcf
2 changed files with 12 additions and 5 deletions

View file

@ -1,7 +1,6 @@
#pragma once
#include <VirtualFileSystem/CharacterDevice.h>
#include "DoubleBuffer.h"
#include "IRQHandler.h"
class PS2MouseDevice final : public IRQHandler, public CharacterDevice {
@ -29,7 +28,7 @@ private:
void wait_then_write(byte port, byte data);
byte wait_then_read(byte port);
DoubleBuffer m_buffer;
CircularQueue<byte, 600> m_queue;
byte m_data_state { 0 };
signed_byte m_data[3];
};