80 uint8_t has_errors = 0;
84 bool data_overrun : 1;
85 bool queue_overflow : 1;
86 bool parity_error : 1;
109 errors_.has_errors = 0;
120 return errors_.has_errors;
130 return errors_.frame_error;
140 return errors_.data_overrun;
150 return errors_.queue_overflow;
160 return errors_.parity_error;
177 template<
typename>
struct UART_trait
179 static constexpr bool IS_UART =
false;
180 static constexpr bool IS_HW_UART =
false;
181 static constexpr bool IS_SW_UART =
false;
182 static constexpr bool HAS_TX =
false;
183 static constexpr bool HAS_RX =
false;
Holder of latest UART errors.
bool frame_error() const
Indicate if a frame error has occurred.
bool data_overrun() const
Indicate if a data overrun has occurred.
bool queue_overflow() const
Indicate if a queue overflow has occurred.
void clear_errors()
Reset UART errors to no error.
uint8_t has_errors() const
Indicate if there are UART errors pending.
bool parity_error() const
Indicate if a parity error has occurred.
This namespace defines common errors that can be returned by some FastArduino API methods,...
Defines all API for UART features.
BufferHandling
How the TX/RX buffer should be handled when ending transmission (see end() methods) on UATX/UARX.
@ FLUSH
Flush buffer before stopping transmission (buffer will be empty after calling end()).
@ KEEP
Stop transmission immediately, keep buffer as-is.
@ CLEAR
Stop transmission immediately, clear buffer.
StopBits
Number of stop bits used for serial transmission.
Parity
Parity used for serial transmission.