FastArduino  v1.8
C++ library to build fast but small Arduino/AVR projects
serial Namespace Reference

Defines all API for UART features. More...

Namespaces

 hard
 Defines API types used by hardware UART features.
 
 soft
 Defines API types used by software UART features.
 

Classes

class  UARTErrors
 Holder of latest UART errors. More...
 

Enumerations

enum  Parity : uint8_t {
  Parity::NONE = 0,
  Parity::EVEN = 1,
  Parity::ODD = 3
}
 Parity used for serial transmission. More...
 
enum  StopBits : uint8_t {
  StopBits::ONE = 1,
  StopBits::TWO = 2
}
 Number of stop bits used for serial transmission. More...
 
enum  BufferHandling : uint8_t {
  BufferHandling::KEEP = 0x00,
  BufferHandling::CLEAR = 0x01,
  BufferHandling::FLUSH = 0x02
}
 How the TX/RX buffer should be handled when ending transmission (see end() methods) on UATX/UARX. More...
 

Detailed Description

Defines all API for UART features.

This namespace embeds two namespaces:

  • hard contains API for hardware UART (only for MCU that support it)
  • soft contains API for software-emulated UART (for all MCU)

Enumeration Type Documentation

◆ Parity

enum serial::Parity : uint8_t
strong

Parity used for serial transmission.

Enumerator
NONE 

No parity bit.

EVEN 

Even parity bit.

ODD 

Odd parity bit.

Definition at line 37 of file uart_commons.h.

◆ StopBits

enum serial::StopBits : uint8_t
strong

Number of stop bits used for serial transmission.

Enumerator
ONE 

One stop bit.

TWO 

Two stop bits.

Definition at line 50 of file uart_commons.h.

◆ BufferHandling

enum serial::BufferHandling : uint8_t
strong

How the TX/RX buffer should be handled when ending transmission (see end() methods) on UATX/UARX.

Enumerator
KEEP 

Stop transmission immediately, keep buffer as-is.

CLEAR 

Stop transmission immediately, clear buffer.

FLUSH 

Flush buffer before stopping transmission (buffer will be empty after calling end()).

Definition at line 62 of file uart_commons.h.