![]() |
PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
Abstract base class for all unbuffered UART devices. More...
#include <PropWare/serial/uart/uart.h>
Public Types | |
enum | Parity { Parity::NO_PARITY, Parity::EVEN_PARITY, Parity::ODD_PARITY } |
enum | ErrorCode { NO_ERROR = 0, BEG_ERROR = UART_ERRORS_BASE, BAUD_TOO_HIGH = BEG_ERROR, PARITY_ERROR, INVALID_DATA_WIDTH, INVALID_STOP_BIT_WIDTH, NULL_POINTER, TIMEOUT_ERROR, END_ERROR = UART::TIMEOUT_ERROR } |
Public Member Functions | |
virtual ErrorCode | set_data_width (const uint8_t dataWidth) |
uint8_t | get_data_width () const |
virtual void | set_parity (const UART::Parity parity) |
UART::Parity | get_parity () const |
ErrorCode | set_stop_bit_width (const uint8_t stopBitWidth) |
uint8_t | get_stop_bit_width () const |
void | set_baud_rate (const int32_t baudRate) |
int32_t | get_baud_rate () const |
Static Public Attributes | |
static const uint8_t | DEFAULT_DATA_WIDTH = 8 |
static const Parity | DEFAULT_PARITY = Parity::NO_PARITY |
static const uint8_t | DEFAULT_STOP_BIT_WIDTH = 1 |
static const int | MAX_BAUD = 4413793 |
Abstract base class for all unbuffered UART devices.
Configurable with the following options:
Speed tests:
Error codes - Proceeded by SD, SPI, and HD44780
Enumerator | |
---|---|
NO_ERROR | No errors; Successful completion of the function |
BEG_ERROR | First error code for PropWare::UART |
BAUD_TOO_HIGH | The requested baud rate is too high |
PARITY_ERROR | A parity error has occurred during read |
INVALID_DATA_WIDTH | The requested data width is not between 1 and 16 (inclusive) |
INVALID_STOP_BIT_WIDTH | The requested stop bit width is not between 1 and 14 (inclusive) |
NULL_POINTER | Null pointer was passed as an argument |
TIMEOUT_ERROR | Reading from the serial connection timed out |
END_ERROR | Last error code used by PropWare::UART |
|
strong |