Deleted Added
sdiff udiff text old ( 12653:4f6b6c1a8e2f ) new ( 12654:749de33b7af6 )
full compact
1/*
2 * Copyright (c) 2017-2018 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 30 unchanged lines hidden (view full) ---

39 *
40 * Authors: Gabe Black
41 * Andreas Sandberg
42 */
43
44#ifndef __DEV_PS2_KEYBOARD_HH__
45#define __DEV_PS2_KEYBOARD_HH__
46
47#include "base/vnc/vncinput.hh"
48#include "dev/ps2/device.hh"
49
50struct PS2KeyboardParams;
51
52class PS2Keyboard : public PS2Device, VncKeyboard
53{
54 protected:
55 static const uint8_t ID[];
56
57 enum Command
58 {
59 LEDWrite = 0xED,
60 DiagnosticEcho = 0xEE,

--- 13 unchanged lines hidden (view full) ---

74 Resend = 0xFE,
75 Reset = 0xFF
76 };
77 static const uint16_t NoCommand = (uint16_t)(-1);
78
79
80 uint16_t lastCommand;
81
82 /** is the shift key currently down */
83 bool shiftDown;
84
85 /** Is the device enabled? */
86 bool enabled;
87
88 public:
89 PS2Keyboard(const PS2KeyboardParams *p);
90
91 void serialize(CheckpointOut &cp) const override;
92 void unserialize(CheckpointIn &cp) override;
93
94 protected: // PS2Device
95 void recv(uint8_t data) override;
96
97 public: // VncKeyboard
98 void keyPress(uint32_t key, bool down) override;
99};
100
101#endif // __DEV_PS2_KEYBOARD_hH__
102