Line Discipline or Termios lacks ?

Thomas Doerfler Thomas.Doerfler at imd-systems.de
Thu Sep 18 15:24:20 UTC 2003



> Do you what I want, I can reimplement in my BSP the
> console.c instead of use the console.c of
> libbsp_shared but I want to knwon if it's was
> possible to do this with another feature. :-)
> 

I do not know a general way to impleent this, so 
creating your private version of the device driver 
seems the only way for me.

wkr,
	Thomas.


> --- Thomas Doerfler <Thomas.Doerfler at imd-systems.de>
> wrote:
> > Hello Cedric,
> > 
> > rtems termios has a feature to control the hardware
> > handshake 
> > lines (or, actually, only the RTS line) to signal to
> > the 
> > oposite side, that the receive buffer is almost
> > full, or that 
> > there is more space available. This features is
> > available in 
> > some console drivers, it depends on the
> > implementation of the 
> > "stopRemoteTx" and "startRemoteTx" hooks. 
> > 
> > If the hardware driver in use supports these calls
> > and the 
> > device has the CRTSCTS flag set, then termios will
> > control the 
> > hardware handshake output line RTS for you.
> > 
> > This has nothing to do with "line discipline". The
> > "line 
> > discipline" feature allows redirecting the character
> > stream to 
> > certain additional, external functions, that can do
> > wierd 
> > things like decoding the incoming character stream
> > as PPP 
> > packets and so on. 
> > 
> > If the functionality in termios for hardware
> > handshake line 
> > control is not sufficent for you, you might add
> > "private" 
> > functions to the "ioctl" function of your device
> > driver, which 
> > might in turn do whatever you want with the hardware
> > handshake 
> > lines of your devices.
> > 
> > wkr,
> > 	Thomas.
> > 
> > 
> > > Hi
> > > 
> > > I try to implement a full driver for my serial
> > port.
> > > Today that's work fine with the termios and
> > console
> > > shared functions but now I try to control by hand
> > > my line's signal like CTS or RTS. (ex :
> > > Get_CTS,Get_RTS)
> > > But I can't find how to correctly implement this
> > > feature.
> > > 
> > > I read some line discipline documentation and I
> > found
> > > that it's possible in rtems to implement a line
> > > discipline like for ppp. If your have 2 different
> > > hardware uart on your board you should have 2
> > > functions to read the CTS value but you will have
> > > only one line discipline (the termios_built_in).
> > > 
> > > But I understand that a line discipline should be
> > > a shared discipline for all port. It doesn't
> > depend of
> > > the hardware UART.
> > > 
> > > So to implement driver depend read or write
> > CTS/RTS
> > > DSR or other, it should be in my hardware driver
> > > and call be rtems_termois_ioctl.
> > > 
> > > rtems_termois_ioctl have a switch to do the
> > > command and if it does known, it try to call the
> > > line discipline_ioctl function.
> > > 
> > > So if line discipline isn't hardware depend how
> > > can I do ?
> > > 
> > > Should I make a Termios evolution to call some
> > other
> > > command ?
> > > 
> > > Thanks a lot
> > > 
> > > 
> > > =====
> > > AUBERT Cedric
> > > SDEL Controle Commande
> > > rue Nungesser & Coli
> > > 44860 St Aignan de Grand Lieu
> > > 
> > > E-mail : cedric_aubert at yahoo.fr
> > > Http : http://www.controle-commande.sdel.fr/
> > > 
> > > __________________________________
> > > Do you Yahoo!?
> > > Yahoo! SiteBuilder - Free, easy-to-use web site
> > design software
> > > http://sitebuilder.yahoo.com
> > 
> > --------------------------------------------
> > IMD Ingenieurbuero fuer Microcomputertechnik
> > Thomas Doerfler           Herbststrasse 8
> > D-82178 Puchheim          Germany
> > email:    Thomas.Doerfler at imd-systems.de
> > PGP public key available at: http://www.imd-
> > systems.de/pgp_keys.htm
> > 
> 
> 
> =====
> AUBERT Cedric
> SDEL Controle Commande
> rue Nungesser & Coli
> 44860 St Aignan de Grand Lieu
> 
> E-mail : cedric_aubert at yahoo.fr
> Http : http://www.controle-commande.sdel.fr/
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com

--------------------------------------------
IMD Ingenieurbuero fuer Microcomputertechnik
Thomas Doerfler           Herbststrasse 8
D-82178 Puchheim          Germany
email:    Thomas.Doerfler at imd-systems.de
PGP public key available at: http://www.imd-
systems.de/pgp_keys.htm




More information about the users mailing list