Go to the documentation of this file.
45 #include "debug/PS2.hh"
47 #include "params/PS2Mouse.hh"
51 status(0), resolution(4), sampleRate(100)
60 DPRINTF(PS2,
"Mouse ID requested.\n");
65 DPRINTF(PS2,
"Disabling data reporting.\n");
70 DPRINTF(PS2,
"Enabling data reporting.\n");
75 panic(
"Mouse resend unimplemented.\n");
77 DPRINTF(PS2,
"Resetting the mouse.\n");
88 DPRINTF(PS2,
"Setting mouse scale to 1:1.\n");
93 DPRINTF(PS2,
"Setting mouse scale to 2:1.\n");
98 if (
data.size() == 1) {
99 DPRINTF(PS2,
"Setting mouse resolution.\n");
103 DPRINTF(PS2,
"Mouse resolution set to %d.\n",
data[1]);
109 DPRINTF(PS2,
"Getting mouse status.\n");
116 panic(
"Reading mouse data unimplemented.\n");
118 panic(
"Resetting mouse wrap mode unimplemented.\n");
120 panic(
"Setting mouse wrap mode unimplemented.\n");
122 panic(
"Setting mouse remote mode unimplemented.\n");
124 if (
data.size() == 1) {
125 DPRINTF(PS2,
"Setting mouse sample rate.\n");
129 DPRINTF(PS2,
"Mouse sample rate %d samples "
130 "per second.\n",
data[1]);
136 DPRINTF(PS2,
"Disabling and resetting mouse.\n");
144 warn(
"Unknown mouse command %#02x.\n",
data[0]);
171 PS2MouseParams::create()
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.
#define UNSERIALIZE_SCALAR(scalar)
void serialize(CheckpointOut &cp) const override
Serialize an object.
void sendAck()
Send an ACK byte to the host.
PS2Mouse(const PS2MouseParams *p)
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 Wed Sep 30 2020 14:02:11 for gem5 by doxygen 1.8.17