Comm ports on Pc386

Correo Fernando-ruiz (E-mail) correo at fernando-ruiz.com
Thu Jun 28 17:46:58 UTC 2001



> -----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)
> 
> 
> 



More information about the users mailing list