Represents an abstract UART interface.
The UartNonBlocking
interface provides a basic set of methods for performing Non-Blocking UART communication.
Public Member Functions | |
Status | ReadExactly (ByteSpan rx_buffer, Function< void(Status status, ConstByteSpan buffer)> &&callback) |
Status | ReadAtLeast (ByteSpan rx_buffer, size_t min_bytes, Function< void(Status status, ConstByteSpan buffer)> &&callback) |
bool | CancelRead () |
Status | Write (ConstByteSpan tx_buffer, Function< void(StatusWithSize status)> &&callback) |
bool | CancelWrite () |
Status | FlushOutput (Function< void(Status status)> &&callback) |
bool | CancelFlushOutput () |
![]() | |
Status | Enable () |
Status | Disable () |
Status | SetBaudRate (uint32_t baud_rate) |
Status | SetFlowControl (bool enable) |
size_t | ConservativeReadAvailable () |
Status | ClearPendingReceiveBytes () |
Private Member Functions | |
virtual Status | DoRead (ByteSpan rx_buffer, size_t min_bytes, Function< void(Status status, ConstByteSpan buffer)> &&callback)=0 |
virtual bool | DoCancelRead ()=0 |
virtual Status | DoWrite (ConstByteSpan tx_buffer, Function< void(StatusWithSize status)> &&callback)=0 |
virtual bool | DoCancelWrite ()=0 |
virtual Status | DoFlushOutput (Function< void(Status status)> &&) |
virtual bool | DoCancelFlushOutput () |