distortos
v0.7.0
object-oriented C++ RTOS for microcontrollers
|
#include "distortos/devices/communication/UartBase.hpp"
Public Types | |
enum | ErrorBits { framingError, noiseError, overrunError, parityError, errorBitsMax } |
indexes of error bits in ErrorSet More... | |
using | ErrorSet = std::bitset< errorBitsMax > |
set of error bits More... | |
Public Member Functions | |
virtual | ~UartBase ()=default |
UartBase's destructor. More... | |
virtual void | readCompleteEvent (size_t bytesRead)=0 |
"Read complete" event More... | |
virtual void | receiveErrorEvent (ErrorSet errorSet)=0 |
"Receive error" event More... | |
virtual void | transmitCompleteEvent ()=0 |
"Transmit complete" event More... | |
virtual void | transmitStartEvent ()=0 |
"Transmit start" event More... | |
virtual void | writeCompleteEvent (size_t bytesWritten)=0 |
"Write complete" event More... | |
UartBase class is an interface with callbacks for low-level UART driver, which can serve as a base for high-level UART drivers
using distortos::devices::UartBase::ErrorSet = std::bitset<errorBitsMax> |
set of error bits
|
virtualdefault |
UartBase's destructor.
|
pure virtual |
"Read complete" event
Called by low-level UART driver when whole read buffer is filled.
[in] | bytesRead | is the number of bytes read by low-level UART driver (and written to read buffer) |
Implemented in distortos::devices::SerialPort.
|
pure virtual |
"Receive error" event
Called by low-level UART driver when the last character was received with an error. This character is written to the read buffer before this function is called.
[in] | errorSet | is the set of error bits |
Implemented in distortos::devices::SerialPort.
|
pure virtual |
"Transmit complete" event
Called by low-level UART driver when the transmission is physically finished.
Implemented in distortos::devices::SerialPort, and distortos::devices::Rs485.
|
pure virtual |
"Transmit start" event
Called by low-level UART driver when new transmission starts.
Implemented in distortos::devices::SerialPort, and distortos::devices::Rs485.
|
pure virtual |
"Write complete" event
Called by low-level UART driver when whole write buffer was transferred - the transmission may still be in progress.
[in] | bytesWritten | is the number of bytes written by low-level UART driver (and read from write buffer) |
Implemented in distortos::devices::SerialPort.