From 8f94eeac0c2cd35f883944e5d552a428027a0d70 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Mon, 9 Apr 2018 20:07:52 +0100 Subject: ps2: Unify device data buffering All PS/2 device currently implement various ad-hoc mechanisms to handle multi-byte commands. This is error-prone and makes it hard to implement new devices. Create a buffering mechanism in the base class to avoid this. Change-Id: If5638b0ab68decea8de7631ecead0a9ebad1547b Signed-off-by: Andreas Sandberg Reviewed-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/9765 Reviewed-by: Gabe Black --- src/dev/ps2/mouse.hh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/dev/ps2/mouse.hh') diff --git a/src/dev/ps2/mouse.hh b/src/dev/ps2/mouse.hh index e0b4c5384..9150f3f8f 100644 --- a/src/dev/ps2/mouse.hh +++ b/src/dev/ps2/mouse.hh @@ -71,7 +71,6 @@ class PS2Mouse : public PS2Device Resend = 0xFE, Reset = 0xFF }; - static const uint16_t NoCommand = (uint16_t)(-1); BitUnion8(Status) Bitfield<6> remote; @@ -81,8 +80,6 @@ class PS2Mouse : public PS2Device Bitfield<0> rightButton; EndBitUnion(Status) - uint16_t lastCommand; - Status status; uint8_t resolution; uint8_t sampleRate; @@ -94,7 +91,7 @@ class PS2Mouse : public PS2Device void unserialize(CheckpointIn &cp) override; protected: // PS2Device - void recv(uint8_t data) override; + bool recv(const std::vector &data) override; }; #endif // __DEV_PS2_MOUSE_hH__ -- cgit v1.2.3