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