41#include "params/SerialDevice.hh"
42#include "params/SerialNullDevice.hh"
62 "A UART has already been associated with this device.");
86 panic(
"SerialNullDevice does not have pending data.\n");
Base class for serial devices such as terminals.
std::function< void()> interfaceCallback
Currently regisxtered host interface layer callback.
void notifyInterface()
Notify the host interface of pending data.
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.
SerialDevice(const SerialDeviceParams &p)
SerialNullDevice(const SerialNullDeviceParams &p)
uint8_t readData() override
Read a character from the device.
Abstract superclass for simulation objects.
#define panic(...)
This implements a cprintf based panic() function.
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.