Mail Archives: cygwin/2004/11/19/16:15:42
Hi:
I'm a new cygwin user, attepting to port a Linux package that uses the COM
ports to drive a remote device. I'm finding that calls to tcsetattr don't
seem to work. What is happening is that although the speed is being
setup correctly, the values that I want for c_iflag and c_cflag are not
being set, but left as they were before. Is this a known bug (there were
conversations about this last year in the archives) and if so is there any
idea when it will be fixed?, or am I confused (equally likely!)
Usage is:
...
int port;
struct termios p;
...
port = open("/dev/ttyS1", O_RDWR|O_NOCTTY|O_NDELAY);
...
memset(&p, 0, sizeof(struct termios));
p.c_iflag = IGNBRK|IGNPAR;
p.c_cflag = CS8|CREAD|CLOCAL|B9600;
cfsetispeed(&p, B9600);
cfsetospeed(&p, B9600);
if(tcsetattr(port, TCSANOW, &p) < 0)
grumble
Thanks
--------------------------------------------------------------------------
Roger Pryor
Vancouver, B.C., V6E 1K7, Canada
--
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 -