Go to the documentation of this file.
45 #include "debug/PS2.hh"
47 #include "params/PS2TouchKit.hh"
52 enabled(false), touchKitEnabled(false)
81 DPRINTF(PS2,
"Resetting device.\n");
94 DPRINTF(PS2,
"Disabling device.\n");
100 DPRINTF(PS2,
"Enabling device.\n");
106 DPRINTF(PS2,
"Setting defaults and disabling device.\n");
119 return data.size() == 2;
141 panic(
"Unknown byte received: %#x\n",
data[0]);
157 const uint8_t cmd =
data[2];
166 warn_if(
len != 1,
"Unexpected activate packet length: %u\n",
len);
171 panic(
"Unimplemented touchscreen command: %#x\n", cmd);
180 for (
int i = 0;
i < size; ++
i)
199 const uint8_t resp[] = {
201 (uint8_t)(_x >> 7), (uint8_t)(_x & 0x7f),
202 (uint8_t)(_y >> 7), (uint8_t)(_y & 0x7f),
205 send(resp,
sizeof(resp));
209 PS2TouchKitParams::create()
void send(const uint8_t *data, size_t size)
Send data from a PS/2 device to a host.
bool recvTouchKit(const std::vector< uint8_t > &data)
#define UNSERIALIZE_SCALAR(scalar)
void sendAck()
Send an ACK byte to the host.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void serialize(CheckpointOut &cp) const override
Serialize an object.
VncInput *const vnc
The vnc server we're connected to (if any)
#define SERIALIZE_SCALAR(scalar)
#define warn_if(cond,...)
Conditional warning macro that checks the supplied condition and only prints a warning if the conditi...
void mouseAt(uint16_t x, uint16_t y, uint8_t buttons) override
called whenever the mouse moves or it's button state changes buttons is a simple mask with each butto...
void sendTouchKit(const uint8_t *data, size_t size)
PS2TouchKit(const PS2TouchKitParams *p)
void serialize(CheckpointOut &cp) const override
Serialize an object.
std::ostream CheckpointOut
bool recv(const std::vector< uint8_t > &data) override
Data received from host.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
size_t sendPending() const
Output buffer size.
bool touchKitEnabled
Has the driver enabled TouchKit mode? The model suppresses touch event generation until this is true.
const std::vector< uint8_t > ID
bool enabled
Is the device enabled?
#define panic(...)
This implements a cprintf based panic() function.
Generated on Wed Sep 30 2020 14:02:11 for gem5 by doxygen 1.8.17