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]

Re: PC nonblocking console I/O


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 keep getting error 22 "Invalid argument".  I am able to to turn off
> character echoing (I'm trying to get a raw console) so I'm pretty sure
> that
> the console handle is okay.  Is this not working because the console
> doesn't
> correspond to a real serial device or am I doing something wrong?
> 
> I did set the CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING option in the
> configuration.  I've tried various options in the configuration tool
> with
> regard to enabling "TTY mode serial device drivers" and "TTY mode
> channel #2"
> but without success.  If anyone could provide pointers they would be
> much appreciated.
> 
> 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.

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


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


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