[ECOS] PC nonblocking console I/O

Richardson, Anthony ar63@evansville.edu
Thu Jan 29 22:38:00 GMT 2004


On Thursday, January 29, 2004 4:21 PM Gary Thomas wrote:
> On Thu, 2004-01-29 at 15:17, Richardson, Anthony wrote:
> > On Thu, 2004-01-29 at 15:49, Thomas, Gary wrote:
> > > On Thu, 2004-01-29 at 14:38, Richardson, Anthony wrote:
> > > > I've been trying to get nonblocking read working on the 
> PC console
> > > > using the following code:
> > > > 
> > > >   cyg_uint32 blkinfo = 0;
> > > >   length = sizeof(blkinfo);
> > > >   stat = cyg_io_set_config(console,
> > > > CYG_IO_SET_CONFIG_SERIAL_READ_BLOCKING,
> > > >                            &blkinfo, &length);
> > > > 
> > > > where console is a handle corresponding to "/dev/ttydiag"
> > > > I'm using the 2.0 release.
> > > 
> > > You can't use ttydiag for this - it has to be a regular 
> serial device.
> > > 'ttydiag' maps onto the diagnostic I/O channel which is 
> polled only.
> > 
> > Is there another way to get nonblocked keyboard input then?
> 
> Use a different serial device other than ttydiag.  Configure 
> to include
> the interrupt driven driver for /dev/ser0 and use that.  That driver 
> does handle non-blocking I/O

I'm trying to get nonblocked input from the keyboard on the target PC.
That is /dev/ser2 correct?  When I use that device name in
cyg_io_lookup()
to get a handle, the system crashes. I assume that is because it is not
a
real serial device.  So am I out of luck, or should using /dev/ser2
work?

Thanks for all of your help.

Tony


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



More information about the Ecos-discuss mailing list