I posted a new beta, SerialPortBeta20120103.zip, here Google Code Archive - Long-term storage for Google Code Project Hosting.
Here is the changes.txt file:
3 Jan 2012
Almost total rewrite so expect bugs! Be sure to tell me about bugs.
See html for more details about the following functions.
Changed begin() to have a optional second argument to set parity,
character size, and number of stop bits.void begin (long baud, uint8_t options = SP_8_BIT_CHAR)
The following can be ORed together for options:
Choose one stop bit option.
static const uint8_t SP_1_STOP_BIT = 0 (default)
static const uint8_t SP_2_STOP_BIT = M_USBSChoose one character size.
static const uint8_t SP_5_BIT_CHAR = 0
static const uint8_t SP_6_BIT_CHAR = M_UCSZ0
static const uint8_t SP_7_BIT_CHAR = M_UCSZ1
static const uint8_t SP_8_BIT_CHAR = M_UCSZ0 | M_UCSZ1Choose one parity option.
static const uint8_t SP_EVEN_PARITY = M_UPM1
static const uint8_t SP_NO_PARITY = 0
static const uint8_t SP_ODD_PARITY = M_UPM0 | M_UPM1Added RX error checking.
The following error bits are returned:
static const uint8_t SP_FRAMING_ERROR = M_FE
static const uint8_t SP_PARITY_ERROR = M_UPE
static const uint8_t SP_RX_BUF_OVERRUN = 1
static const uint8_t SP_RX_DATA_OVERRUN = M_DORAdded the following functions:
void clearRxError()
uint8_t getRxError()
size_t read (uint8_t *b, size_t n)
size_t write (const char *s) - overrides version in Stream
size_t write (uint8_t *b, size_t n) - overrides version in Stream
size_t writeln (const char *s)
size_t writeln ()