Class UartTerminalDevice

Inheritance Relationships

Base Type

  • public modm::IODevice

Class Documentation

class UartTerminalDevice : public modm::IODevice

A wrapper around UART3 used by the terminal handler. Allows for stream-based operations to be performed on data being sent/received by the UART line by using an instance of this class with a modm::IOStream.

Public Functions

UartTerminalDevice(Drivers *drivers)
DISALLOW_COPY_AND_ASSIGN(UartTerminalDevice)
virtual ~UartTerminalDevice() = default
void initialize()
bool read(char &c) override

Reads a byte from the UART receive buffer and populates c with the value.

Parameters:

c[out] The byte that data will be read into.

void write(char c) override

Writes the character c into the UART buffer.

Parameters:

c[out] The byte to write to the buffer.

void flush() override

Flushes the UART tx buffer.