Comm ports on Pc386

Angelo Fraietta angelo at hunterlink.net.au
Tue Jul 3 07:21:45 UTC 2001


What is also interesting, if I place a printf statement before declaring
a
FILE*, I get a compile error. Eg.

printf ("something")
FILE* fp

compile error, parse error before *

"Correo Fernando-ruiz (E-mail)" wrote:

> > -----Mensaje original-----
> > De: Angelo Fraietta [mailto:angelo at hunterlink.net.au]
> > Enviado el: jueves, 28 de junio de 2001 3:52
> > Para: rtems-users
> > Asunto: Comm ports on Pc386
> >
> >
> > Does anyone have an example of using the comm ports on a PC386 build?
> >
> > --
>
> ***************************************************************
>
> #include <tty_drv.h>
> #include <console.h>
> #include <clockdrv.h>
> #include <timerdrv.h>
>
> rtems_driver_address_table Device_drivers[] = {
>         CONSOLE_DRIVER_TABLE_ENTRY,
>         TTY1_DRIVER_TABLE_ENTRY,
>         TTY2_DRIVER_TABLE_ENTRY,
>         CLOCK_DRIVER_TABLE_ENTRY,
>         {NULL,NULL,NULL,NULL,NULL,NULL},
> };
> #include <confdefs.h>
>
> ****************************************************************
>
> Adding this like rtems device configuration you have
> THREE termios ports in your PC.
>
> /dev/console
> /dev/ttyS1
> /dev/ttyS2
>
> How to manage this ports with TERMIOS?
> See the /rtems/c/src/tests/libtests/termios directory.
> A complete program to drive a termios device.
> (My first source to understand it. Thanks Eric Norum)
> Enjoy it.
>
> Are you using the last snapshot (20010525)?
> With this you can open remote consoles in every port termios.
>
> /* TASK NAME,STACK SIZE, TASK PRIO, DEV_NAME, BAUDS & LINE SETT.,FOREVER*/
> #include <shell.h>
> Init() {
> ...
> shell_init("sh1",16384,100,"/dev/ttyS1"  ,B38400|CS8,TRUE);
> shell_init("sh2",16384,100,"/dev/ttyS2"  ,B38400|CS8,TRUE);
> shell_init("shc",16384,100,"/dev/console",B38400|CS8,TRUE);
> ...
> }
>
> Three users accessing at same time at the PC but with RTEMS rtos.
> A new task for evevy user.
>
> Fernando RUIZ CASAS
> home: correo at fernando-ruiz.com
> work: fernando.ruiz at ctv.es
>
> > Angelo Fraietta
> >
> > PO Box 859
> > Hamilton NSW 2303
> >
> > Home Page
> >
> > http://users.hunterlink.net.au/~maaaf/
> >
> > There are those who seek knowledge for the sake of knowledge - that is
> > CURIOSITY
> > There are those who seek knowledge to be known by others - that is
> > VANITY
> > There are those who seek knowledge in order to serve - that is LOVE
> >     Bernard of Clairvaux (1090 - 1153)
> >
> >
> >

--
Angelo Fraietta

PO Box 859
Hamilton NSW 2303

Home Page

http://users.hunterlink.net.au/~maaaf/

There are those who seek knowledge for the sake of knowledge - that is
CURIOSITY
There are those who seek knowledge to be known by others - that is
VANITY
There are those who seek knowledge in order to serve - that is LOVE
    Bernard of Clairvaux (1090 - 1153)



More information about the users mailing list