This is the mail archive of the 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]

Re: Non-blocking mode read from serial port

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.

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

-- Before posting, please read the FAQ: and search the list archive:

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