[ECOS] blocking read of serial device driver

Roland Caßebohm roland.cassebohm@visionsystems.de
Wed Mar 27 08:15:00 GMT 2002


Hi,

I like to have a blocking read with termios for th serial device driver. I 
think when I set c_cc[ VMIN ]=1 it should block, but it doesn't. I have 
looked at the code of termios_read(). The function can only block in 
canonical mode. But when I set c_cc[ VMIN ]=1 the function have to block 
since at least 1 character is received.
My complete configuration:

	newtio.c_cflag = B38400 | CS8 | CLOCAL | CREAD;
	newtio.c_iflag = IGNPAR;
	newtio.c_oflag = 0;
	newtio.c_lflag = 0;
	newtio.c_cc[VTIME] = 0; // inter character timer unused
	newtio.c_cc[VMIN] = 1;  // blocking read until 1 chars received

Roland
-- 

___________________________________________________

VS Vision Systems GmbH, Industrial Image Processing
Roland Caßebohm
Aspelohe 27A, D-22848 Norderstedt, Germany
Mail: roland.cassebohm@visionsystems.de
http://www.visionsystems.de
___________________________________________________

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list