Messages in this thread | | | Date | Tue, 18 Jan 2011 10:57:37 +0000 | From | Alan Cox <> | Subject | Re: serial port programming second question (newbie) |
| |
On Mon, 17 Jan 2011 16:41:38 -0800 Donna Rigas <donna.rigas@gmail.com> wrote:
> Also, if your call to tcsetattr fails, or if the ioctl call to > set the baud rate fails, does it matter if you restore the serial > port settings or not?
If they fail the returned struct contains the settings you ended up with, eg the baud rate you actually got. Older kernels didn't get that detail right but current ones do. Generally they will try and pick a nearest suitable rate.
Alan
| |