28 #include <sys/thread.h> 50 #define UART_ERRORS_LIMIT 16 52 #define UART_ERRORS_BASE 64 69 static const uint8_t DEFAULT_DATA_WIDTH = 8;
71 static const uint8_t DEFAULT_STOP_BIT_WIDTH = 1;
73 static const int MAX_BAUD = 4413793;
75 static const int *DEFAULT_BAUD;
76 static const int *PARALLAX_STANDARD_TX;
77 static const int *PARALLAX_STANDARD_RX;
180 virtual void send (uint16_t originalData)
const = 0;
190 HUBTEXT
virtual void send_array (
const char array[], uint32_t words)
const = 0;
Generic definitions and functions for the Parallax Propeller.
virtual int32_t get_baud_rate() const =0
Retrieve the current baud rate.
virtual void set_baud_rate(const int32_t baudRate)=0
Set the baud rate.
Interface for all UART devices.
virtual ErrorCode set_data_width(const uint8_t dataWidth)=0
Set the number of bits for each word of data.
virtual uint8_t get_stop_bit_width() const =0
Retrieve the current number of stop bits in use.
virtual void set_parity(const UART::Parity parity)=0
Set the parity configuration.
virtual void send(uint16_t originalData) const =0
Send a word of data out the serial port.
virtual UART::Parity get_parity() const =0
Retrieve the current parity configuration.
virtual Port::Mask get_tx_mask() const =0
Retrieve the currently configured transmit (TX) pin mask.
virtual void set_tx_mask(const Port::Mask tx)=0
Set the pin mask for TX pin.
virtual ErrorCode set_stop_bit_width(const uint8_t stopBitWidth)=0
Set the number of stop bits used.
Interface for all classes capable of printing.
virtual uint8_t get_data_width() const =0
Retrieve the currently configured data width.
virtual HUBTEXT void send_array(const char array[], uint32_t words) const =0
Send an array of 8-bit (or smaller) words.