libmodbus icon indicating copy to clipboard operation
libmodbus copied to clipboard

Add termios2 support

Open philj56 opened this issue 1 year ago • 2 comments

This adds support for termios2 on Linux, covered by an autoconf check.

There's a small workaround to allow functions from <termios.h> to still be used (i.e. tcflush()), but it could be removed and tcflush() replaced with an ioctl() call if preferred.

An additional check is made in debug mode to see if the desired baud rate has correctly been set; I don't think there's another way to know this, but I'm not 100% sure.

This shouldn't change anything for other platforms - I've tested this on a Mac, but not BSD as I don't have one available.

philj56 avatar Jul 31 '24 09:07 philj56

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

cla-bot[bot] avatar Jul 31 '24 09:07 cla-bot[bot]

Tested 52abfc1 cherry-picked onto bb1344325025e59bb33144394bdacd8298283834 on Linux 6.8.0 with an FT232R to a control system with five nodes configured for 256000 baud.

quozl avatar Apr 06 '25 04:04 quozl