IStreamIo class
#include <serial/stream_io.hpp>
Abstract byte-stream backend used by the serial control transport.
Implementations typically wrap USB CDC or UART-style drivers and provide the minimal operations needed by ControlService.
Derived classes
- class prf::hal::UartStreamIo final
- Default board UART-backed byte stream used by local control transport.
- class prf::hal::usb::CdcStreamIo final
- TinyUSB CDC-backed byte stream used by serial control transport.
Constructors, destructors, conversion operators
- ~IStreamIo() defaulted virtual
Public functions
- auto available() -> uint32_t pure virtual
- Returns number of readable bytes currently available.
- auto init() -> bool pure virtual
- Initializes the underlying stream backend.
- auto label() const -> const char* pure virtual
- Returns short backend label used in diagnostics.
- auto read(void* buffer, uint32_t length) -> uint32_t pure virtual
- Reads up to
lengthbytes into caller-provided buffer. - void service() pure virtual
- Services backend-specific polling or housekeeping.
- auto write(const void* buffer, uint32_t length, uint32_t timeout_ms) -> uint32_t pure virtual
- Writes up to
lengthbytes with backend-defined timeout behavior.