This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

blocking read of serial device driver


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]