imabot2/serialib

Add UART formatting options

Closed this issue · 3 comments

This library looks great, but is currently lacking the ability to set the

  • number data bits
  • parity type (none, even, odd)
  • stop bits (1, 2, 1.5)

It is all hardcoded in e.g.

serialib/lib/serialib.cpp

Lines 204 to 206 in 8e7e23a

// Configure the device : 8 bits, no parity, no control
options.c_cflag |= ( CLOCAL | CREAD | CS8);
options.c_iflag |= ( IGNPAR | IGNBRK );

I'll do a PR then :)

Sorry for the late answer. I didn't see you pull request. It's merged.
Thank you for you contribution.