Go to the documentation of this file.
45 #include "debug/PS2.hh"
47 #include "params/PS2Mouse.hh"
52 status(0), resolution(4), sampleRate(100)
61 DPRINTF(PS2,
"Mouse ID requested.\n");
66 DPRINTF(PS2,
"Disabling data reporting.\n");
71 DPRINTF(PS2,
"Enabling data reporting.\n");
76 panic(
"Mouse resend unimplemented.\n");
78 DPRINTF(PS2,
"Resetting the mouse.\n");
89 DPRINTF(PS2,
"Setting mouse scale to 1:1.\n");
94 DPRINTF(PS2,
"Setting mouse scale to 2:1.\n");
99 if (
data.size() == 1) {
100 DPRINTF(PS2,
"Setting mouse resolution.\n");
104 DPRINTF(PS2,
"Mouse resolution set to %d.\n",
data[1]);
110 DPRINTF(PS2,
"Getting mouse status.\n");
117 panic(
"Reading mouse data unimplemented.\n");
119 panic(
"Resetting mouse wrap mode unimplemented.\n");
121 panic(
"Setting mouse wrap mode unimplemented.\n");
123 panic(
"Setting mouse remote mode unimplemented.\n");
125 if (
data.size() == 1) {
126 DPRINTF(PS2,
"Setting mouse sample rate.\n");
130 DPRINTF(PS2,
"Mouse sample rate %d samples "
131 "per second.\n",
data[1]);
137 DPRINTF(PS2,
"Disabling and resetting mouse.\n");
145 warn(
"Unknown mouse command %#02x.\n",
data[0]);
bool recv(const std::vector< uint8_t > &data) override
Data received from host.
void send(const uint8_t *data, size_t size)
Send data from a PS/2 device to a host.
PS2Mouse(const PS2MouseParams &p)
#define UNSERIALIZE_SCALAR(scalar)
void serialize(CheckpointOut &cp) const override
Serialize an object.
void sendAck()
Send an ACK byte to the host.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
#define SERIALIZE_SCALAR(scalar)
void serialize(CheckpointOut &cp) const override
Serialize an object.
std::ostream CheckpointOut
void unserialize(CheckpointIn &cp) override
Unserialize an object.
const std::vector< uint8_t > ID
#define panic(...)
This implements a cprintf based panic() function.
Generated on Tue Jun 22 2021 15:28:28 for gem5 by doxygen 1.8.17