[ECOS] Non-blocking mode read from serial port

Jonathan Larmour jifl@eCosCentric.com
Tue Feb 24 18:36:00 GMT 2004


Ali Rodgo wrote:
> Hello, what i have to do is to read one byte from the serial port send
> it to the screen and repeat the process.Without VMIN=1 in the programm
> the read() function doesn't block itself and go to the next step even
> though no data was read.

That should really never happen. Unless you marked the socket as 
non-blocking - but if you want to wait until a byte is read, then it 
shouldn't be non-blocking.

> With the VMIN=1 the read() function block
> itself each three data and these are always the same, 0 or 128.I don't
> really know why.The code is quite simple but doesn't work:

VMIN=1 won't work yet, sorry. But there are easy to use alternatives.

Jifl
-- 
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
>>>>> Visit us in booth 2527 at the Embedded Systems Conference 2004 <<<<<
March 30 - April 1, San Francisco http://www.esconline.com/electronicaUSA/
--["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine


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



More information about the Ecos-discuss mailing list