This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Re: select doesn't work on stdin?
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Ken Yee <kenkyee at excite dot com>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Mon, 19 Nov 2012 10:56:36 -0700
- Subject: Re: [ECOS] Re: select doesn't work on stdin?
- References: <20121119110802.31170@web007.roc2.bluetie.com>
On 2012-11-19 09:08, Ken Yee wrote:
Gary Thomas wrote:
Have you tried using a serial port (not the diagnostic console)?
The problem with the diag port is that it is blocking which does
not play nice with select()
Unfortunately, we're out of serial ports on our system. We only have 3. 1 goes to a modem, 1 is used for board-board comms, and the 3rd is the console port which we have shared w/ the diag port (eCos forces you to assign the diag port to a serial port and you can't assign it to /dev/null).
Not exactly true - you can use the serial driver (interrupt driven, etc)
alongside the polled diag driver, at least for output. I've done it
on many occasions and it works just fine.
I can do ioctl w/ the FNONBIO flag to get it to run in non-blocking mode, but it only sees 1 in 18 characters (you hit the same key 17-18 times before one value gets to the read character function)-:
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss