Mail Archives: cygwin/2003/07/23/10:27:53
Hi,
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>
tcsetattr(tty_fd,TCSANOW,&newtio);
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?
Regards
Mats
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -