41#ifndef __DEV_PS2_DEVICE_HH__
42#define __DEV_PS2_DEVICE_HH__
55struct PS2DeviceParams;
63 Device(
const PS2DeviceParams &
p);
121 void send(
const uint8_t *
data,
size_t size);
Abstract superclass for simulation objects.
uint8_t hostRead()
Read a character from the device.
void send(const std::vector< uint8_t > &data)
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
size_t sendPending() const
Output buffer size.
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::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.
bool hostDataAvailable() const
Check if there is pending data from the PS/2 device.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
GEM5_DEPRECATED_CLASS(PS2Device, gem5::ps2::Device)
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::ostream CheckpointOut