47 #include "debug/PS2.hh" 49 #include "params/PS2Device.hh" 82 "A data pending callback has already been associated with this " 99 DPRINTF(PS2,
"PS2: Host -> device: %#x\n", c);
108 assert(data || size == 0);
110 DPRINTF(PS2,
"PS2: Device -> host: %#x\n", *data);
std::function< void()> dataAvailableCallback
void sendAck()
Send an ACK byte to the host.
void hostWrite(uint8_t c)
Transmit a character from the host interface to the device.
PS2Device(const PS2DeviceParams *p)
#define SERIALIZE_CONTAINER(member)
void serialize(CheckpointOut &cp) const override
Serialize an object.
void hostRegDataAvailable(const std::function< void()> &c)
Register a data available callback into the PS/2 interface.
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
#define UNSERIALIZE_CONTAINER(member)
void arrayParamOut(CheckpointOut &cp, const std::string &name, const CircleBuf< T > ¶m)
void send(const uint8_t *data, size_t size)
Send data from a PS/2 device to a host.
std::ostream CheckpointOut
std::deque< uint8_t > outBuffer
Device -> host FIFO.
virtual bool recv(const std::vector< uint8_t > &data)=0
Data received from host.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void arrayParamIn(CheckpointIn &cp, const std::string &name, CircleBuf< T > ¶m)
std::vector< uint8_t > inBuffer
Host -> device buffer.
Abstract superclass for simulation objects.
uint8_t hostRead()
Read a character from the device.