47#include "debug/PS2.hh"
49#include "params/PS2Device.hh"
89 "A data pending callback has already been associated with this "
106 DPRINTF(PS2,
"PS2: Host -> device: %#x\n",
c);
115 assert(
data || size == 0);
Abstract superclass for simulation objects.
uint8_t hostRead()
Read a character from the device.
std::deque< uint8_t > outBuffer
Device -> host FIFO.
void hostRegDataAvailable(const std::function< void()> &c)
Register a data available callback into the PS/2 interface.
void hostWrite(uint8_t c)
Transmit a character from the host interface to the device.
std::function< void()> dataAvailableCallback
void serialize(CheckpointOut &cp) const override
Serialize an object.
std::vector< uint8_t > inBuffer
Host -> device buffer.
Device(const PS2DeviceParams &p)
virtual bool recv(const std::vector< uint8_t > &data)=0
Data received from host.
void send(const uint8_t *data, size_t size)
Send data from a PS/2 device to a host.
void sendAck()
Send an ACK byte to the host.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
#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)
#define SERIALIZE_CONTAINER(member)
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::ostream CheckpointOut
void arrayParamOut(CheckpointOut &cp, const std::string &name, const CircleBuf< T > ¶m)
void arrayParamIn(CheckpointIn &cp, const std::string &name, CircleBuf< T > ¶m)