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]

non-blocking read with tty


Hi,
Is it possible to use a non-blocking read (key
CYG_IO_SET_CONFIG_READ_BLOCKING, val = 0) with a tty-mode serial device
driver?
Because tty_read function returns ENOERR only if a '\n' is reached. In
non-blocking mode, the function cyg_io_read almost always returns a value
different from ENOERR (because there is no character input). So tty_read
returns an error and in the application, I always have the character '\n'
(none other character).

Everything is ok if I don't use tty but directly the serial driver
("/dev/ser1") in non-blocking mode.

Is there a way to use tty in non-blocking mode?

Thanks in advance.

Nicolas Brouard


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


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