Go to the documentation of this file.
41 #ifndef __DEV_PS2_DEVICE_HH__
42 #define __DEV_PS2_DEVICE_HH__
49 struct PS2DeviceParams;
112 void send(
const uint8_t *
data,
size_t size);
145 #endif // __DEV_PS2_HOUSE_HH__
void send(const uint8_t *data, size_t size)
Send data from a PS/2 device to a host.
virtual bool recv(const std::vector< uint8_t > &data)=0
Data received from host.
void hostRegDataAvailable(const std::function< void()> &c)
Register a data available callback into the PS/2 interface.
uint8_t hostRead()
Read a character from the device.
void sendAck()
Send an ACK byte to the host.
bool hostDataAvailable() const
Check if there is pending data from the PS/2 device.
std::vector< uint8_t > inBuffer
Host -> device buffer.
void send(const std::vector< uint8_t > &data)
std::deque< uint8_t > outBuffer
Device -> host FIFO.
PS2Device(const PS2DeviceParams *p)
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.
void send(uint8_t data)
Send a byte of data from a PS/2 device to a host.
std::ostream CheckpointOut
void unserialize(CheckpointIn &cp) override
Unserialize an object.
size_t sendPending() const
Output buffer size.
Abstract superclass for simulation objects.
Generated on Wed Sep 30 2020 14:02:08 for gem5 by doxygen 1.8.17