Go to the documentation of this file.
38 #ifndef __DEV_SERIAL_HH__
39 #define __DEV_SERIAL_HH__
45 struct SerialDeviceParams;
46 struct SerialNullDeviceParams;
157 #endif // __DEV_SERIAL_HH__
bool dataAvailable() const override
Check if there is pending data from the serial device.
SerialNullDevice(const SerialNullDeviceParams *p)
void regInterfaceCallback(const std::function< void()> &callback)
Register a data available callback into the host interface layer.
virtual bool dataAvailable() const =0
Check if there is pending data from the serial device.
void writeData(uint8_t c) override
Transmit a character from the host interface to the device.
SerialDevice(const SerialDeviceParams *p)
virtual uint8_t readData()=0
Read a character from the device.
void notifyInterface()
Notify the host interface of pending data.
uint8_t readData() override
Read a character from the device.
Base class for serial devices such as terminals.
std::function< void()> interfaceCallback
Currently regisxtered host interface layer callback.
Dummy serial device that discards all data sent to it.
virtual void writeData(uint8_t c)=0
Transmit a character from the host interface to the device.
Abstract superclass for simulation objects.
Generated on Wed Sep 30 2020 14:02:11 for gem5 by doxygen 1.8.17