diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2018-04-09 20:07:52 +0100 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2018-04-17 11:16:26 +0000 |
commit | 8f94eeac0c2cd35f883944e5d552a428027a0d70 (patch) | |
tree | 2050149cbdcf34eff829e806655c08b7ac5775bc /src/dev/ps2/mouse.hh | |
parent | c85d51e6d62a9591bd5b99dcb0146aae5dbee43f (diff) | |
download | gem5-8f94eeac0c2cd35f883944e5d552a428027a0d70.tar.xz |
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 <andreas.sandberg@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/9765
Reviewed-by: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/dev/ps2/mouse.hh')
-rw-r--r-- | src/dev/ps2/mouse.hh | 5 |
1 files changed, 1 insertions, 4 deletions
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<uint8_t> &data) override; }; #endif // __DEV_PS2_MOUSE_hH__ |