38#ifndef __DEV_SERIAL_HH__
39#define __DEV_SERIAL_HH__
48struct SerialDeviceParams;
49struct SerialNullDeviceParams;
std::function< void()> interfaceCallback
Currently regisxtered host interface layer callback.
void notifyInterface()
Notify the host interface of pending data.
virtual uint8_t readData()=0
Read a character from the device.
virtual void writeData(uint8_t c)=0
Transmit a character from the host interface to the device.
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)
void writeData(uint8_t c) override
Transmit a character from the host interface to the device.
bool dataAvailable() const override
Check if there is pending data from the serial device.
SerialNullDevice(const SerialNullDeviceParams &p)
uint8_t readData() override
Read a character from the device.
SimObject(const Params &p)
Copyright (c) 2024 Arm Limited All rights reserved.