[Ada] Fix serial port control setting on GNU/Linux

Pierre-Marie de Rodat derodat@adacore.com
Mon Nov 30 14:17:11 GMT 2020


This fixes an issue when setting the control flags of the serial
communication port. The c_cflag termios field should not be set with the
baud rate. The speed of the communication is set using the c_ispeed and
c_ospeed fields. Setting the baud rate into the c_cflag has unexpected
results as it will wrongly set some bits used to control other aspects
of the communication channel (bits, parity...).

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* libgnat/g-sercom__linux.adb (Set): Fix control flags of the
	serial port setting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 2068 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201130/548f372f/attachment-0001.bin>


More information about the Gcc-patches mailing list