ncurses tests

Chris Johns cjohns at cybertec.com.au
Tue Jun 6 03:00:45 UTC 2000


Charles-Antoine Gauthier wrote:
> 
> Chris Johns wrote:
> >
> > Joel Sherrill wrote:
> > >
> > > Eric Norum wrote:
> > > >
> > > > Now, where's the bug?   Should the smc1Initialize abide by the termios
> > > > speed?  Probably.  But then how would anyone get a power-up serial line
> > > > rate of anything other than 9600 baud?  I'd say that there's some
> > > > configuration information missing on startup -- but where to put it?
> > >
> > > This is a hardware problem to solve in a general way.  Baud rate is
> > > but one termios harware setting (character size, parity, stop bits)
> > > even if one ignores the logical settings.   This makes me lean to
> > > being able to override the entire default termios settings.
> > >
> > > But then there is the issue of default on a port per port basis.
> > > In many systems, there are more than more serial port.  I hate
> > > to create a solution for /dev/console and nothing else.
> > >
> > > Maybe termios_open should ask the device driver for its initial
> > > hardware oriented settings for that port with a new termios handler.
> > > If the handler is NULL, then use 9600-8N1.
> > >
> >
> > Is this really needed ?
> 
> In the case of the MVME167, the use of termios is NOT optional. The
> calls to termios are built into the driver. Of course, one could code up
> a different driver (different entry points in the console.c file) and
> specify those in the driver table rather than the existing ones. But
> then, this introduces yet more configuration info.

Maybe I was not clear. Termios is the way to go and what I use. I do not
wish to see another driver interface. My statement referred to needing
more configuration information to set some default values for all
interfaces. It seems wrong to have lower layers such as driver
configuring upper layers to get applications to work.

> If we are to add
> configuration information, then lets go for it all hog and specify the
> initial setting of each port, and whether termios is to be used or not.
> That way, the driver open call can make the right decisions.
> By adding support to configure the struct termios during the device open,
> everything will fall into place.
> 

IMO the console is the only issue which needs to be looked at. In my
case I use the bare BSP and have separate BSP code. My init task is a
pre-main which sets the console termios configuration (the code posted)
then calls `main'. No need for a driver defaults. 

-- 
 Chris Johns, mailto:cjohns at cybertec.com.au mailto:ccj at acm.org



More information about the users mailing list