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/keyboard.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/keyboard.hh')
-rw-r--r-- | src/dev/ps2/keyboard.hh | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/dev/ps2/keyboard.hh b/src/dev/ps2/keyboard.hh index f5d83049f..33db1cc76 100644 --- a/src/dev/ps2/keyboard.hh +++ b/src/dev/ps2/keyboard.hh @@ -74,11 +74,8 @@ class PS2Keyboard : public PS2Device, VncKeyboard Resend = 0xFE, Reset = 0xFF }; - static const uint16_t NoCommand = (uint16_t)(-1); - uint16_t lastCommand; - /** is the shift key currently down */ bool shiftDown; @@ -92,7 +89,7 @@ class PS2Keyboard : public PS2Device, VncKeyboard void unserialize(CheckpointIn &cp) override; protected: // PS2Device - void recv(uint8_t data) override; + bool recv(const std::vector<uint8_t> &data) override; public: // VncKeyboard void keyPress(uint32_t key, bool down) override; |