This is the mail archive of the
mailing list for the Cygwin project.
Problems setting baud rate
- From: Mats Liljegren <mlil at enea dot se>
- To: cygwin at cygwin dot com
- Date: Wed, 23 Jul 2003 16:27:27 +0200
- Subject: Problems setting baud rate
I'm using Cygwin GCC 3.2, and have the following code:
tty_fd = open(modem_device[Port-1], O_RDWR | O_NOCTTY );
tcgetattr(tty_fd,&oldtio); /* save current serial port settings */
newtio.c_cflag = bd | CS8 | CLOCAL | CREAD;
<and some other settings>
This doesn't change the baudrate, even though I thought I specified it
in c_cflag. If the baudrate happens to be correct, everything works. If
the baudrate happens to be incorrect, well, I get garbage or nothing.
How do I do to change the baudrate? Would above suffice for Unix, but
not when compiling for Win32?
By the way, I got this email address from Mingw list. Is this a
mailinglist? If so, how can I join?
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html