[ECOS] Termios and waiting for character input
Andre-John Mas
ajmas@sympatico.ca
Fri Aug 25 16:13:00 GMT 2006
Where do I change the VMIN value? I'll change the value to see
if this helps.
BTW I had worked around the issue by simply doing a loop until
the input value was not 0x0. Not very elegant when CPU cycles
matter. I also made the same observation as Gary that the code
worked on other systems. I had tested the same code on MacOS X.
Andre
Jonathan Larmour wrote:
>
> Gary Thomas wrote:
> > Jonathan Larmour wrote:
> >> Gary Thomas wrote:
> >>> Jonathan Larmour wrote:
> >>>> Non-canonical mode processing was only implemented to support
> >>>> VMIN=0,TIME=0. Support for VMIN>0 is rudimentary and I wouldn't
> >>>> trust it. But VMIN defaults to 0, and that sample code posted
> >>>> doesn't attempt to set it to anything else.
> >>>>
> >>>> I imagine it defaults to something else on Linux, hence the
> >>>> difference in behaviour. <fx: goes and checks> Aha, in fact it
> >>>> defaults to 6. The POSIX standard does not set any requirements for
> >>>> the default value, so eCos is fine on this count.
> >>>
> >>> Thanks for looking into this.
> >>>
> >>> Perhaps we should make the default values for VMIN/VMAX configurable,
> >>> possibly with settings that match other systems?
> >>
> >> Maybe so if I had more confidence it worked! If Andre-John (or
> >> yourself) can play around with VMIN>0 and don't find any problems,
> >> then we could change the default for VMIN. NB there is no VMAX, but if
> >> you meant TIME, then TIME>0 is definitely unsupported in the current
> >> code.
> >
> > It does work correctly (or at least the same as Linux) when VMIN=1.
> > If I set VMIN=6, then I have to type 6 characters before the first one
> > is seen.
> > Perhaps that's where a setting of TIME>0 would matter...
>
> Yes indeed, that's the correct behaviour for TIME=0. So maybe it does work,
> and we could set default VMIN to 1.
>
> > At least we could have a way to default the value of VMIN and document
> > the fact that TIME>0 is not implemented (if not already in the docs)
>
> Since VMIN can be set in a well-known and standard way at run-time, I'm not
> sure there's much value in a configuration option for the default.
>
> Termios is unfortunately undocumented. This was in the days when making doc
> edits happen was like pulling teeth. And it became one of those things that
> just never happened.
>
> Jifl
>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list