This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
non-blocking read with tty
- From: "Nicolas Brouard" <nicolas dot brouard at silicomp dot ca>
- To: "eCos Discussion" <ecos-discuss at ecos dot sourceware dot org>
- Date: Mon, 22 Nov 2004 15:25:32 -0500
- Subject: [ECOS] 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