Line Discipline or Termios lacks ?
Cedric Aubert
cedric_aubert at yahoo.fr
Fri Sep 19 06:54:20 UTC 2003
Thanks, that exactly what I want to known. :-)
--- Thomas Doerfler <Thomas.Doerfler at imd-systems.de>
wrote:
> Hi,
>
> >
> > Ok, I want to do this !! :-) But I don't found how
> > termios_ioctl will call my private driver ioctl
> > function.
> >
> > Termios_icotl have a switch(command) :
> > case KnwonCommand1 :
> > case KnwonCommand2 :
> > case KnwonCommand3 :
> > default : Call line discipline ioctl function
>
> Well, I would not change the termios code, but
> intercept the
> ioctl call in your private driver.
>
> Whenever an application performs an ioctl call for a
> specific
> device, then the RTEMS io system calls the "ioctl"
> function in
> the device driver (e.g. "console_ioctl"). A "nomal"
> driver
> supporting "termios" will only hand through that
> call to
> termios_ioctl, in that case the drivers "ioctl"
> function looks
> like:
>
>
>
> /*
> * Handle ioctl request.
> */
> rtems_device_driver console_control(
> rtems_device_major_number major,
> rtems_device_minor_number minor,
> void * arg
> )
> {
> return rtems_termios_ioctl (arg);
> }
>
> In your case, you should intercept your own ioctl
> code in this
> function, so you would change it to:
>
> /*
> * Handle ioctl request.
> */
> rtems_device_driver console_control(
> rtems_device_major_number major,
> rtems_device_minor_number minor,
> void * arg
> )
> {
> rtems_status_code rc;
> rtems_libio_ioctl_args_t *args = arg;
>
> switch(args->command) {
> case_MY_IOCTL_CODE_TO_ENABLE_RTS:
> rc = console_enable_rts(arg);
> break;
> case_MY_IOCTL_CODE_TO_DISABLE_RTS:
> rc = console_disable_rts(arg);
> break;
> default:
> rc = rtems_termios_ioctl (arg);
> break;
> }
> return rc;
> }
>
>
> Does this help a bit?
>
> wkr,
> Thomas.
>
>
> >
> > So How can I do, that's what I don't understand
> and
> > found a solution to do this and use termios ?
> >
> > > wkr,
> > > Thomas.
> >
> >
> >
> >
> >
> > =====
> > 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
More information about the users
mailing list