BSP Reference : solaris

tyCoDrv [solaris]

NAME

tyCoDrv [solaris] - UNIX pseudo tty handler

ROUTINES

tyCoDrv( ) - initialize the tty driver
tyCoDevCreate( ) - create a device for the onboard ports

DESCRIPTION

This is the driver for the UNIX stdin/stdio-based simulated serial port.

USER-CALLABLE ROUTINES

Most of the routines in this driver are accessible only through the I/O system. Two routines, however, must be called directly: tyCoDrv( ) to initialize the driver, and tyCoDevCreate( ) to create devices.

Before the driver can be used, it must be initialized by calling the routine tyCoDrv( ). This routine should be called exactly once, before any reads, writes, or calls to tyCoDevCreate( ). Normally, it is called by usrRoot( ) in usrConfig.c.

Before a terminal can be used, it must be created using tyCoDevCreate( ). Each port to be used should have exactly one device associated with it by calling this routine.

IOCTL

This driver responds to all the same ioctl( ) codes as a normal tty driver; for more information, see the manual entry for tyLib. Setting the baud rate is not implemented, but returns OK.

SEE ALSO

tyCoDrv, tyLib


solaris : Routines

tyCoDrv( )

NAME

tyCoDrv( ) - initialize the tty driver

SYNOPSIS


STATUS tyCoDrv (void)

DESCRIPTION

This routine initializes the serial driver, sets up interrupt vectors, and performs hardware initialization of the serial ports.

This routine should be called exactly once, before any reads, writes, or calls to tyCoDevCreate( ). Normally, it is called by usrRoot( ) in usrConfig.c.

RETURNS

OK or ERROR if the driver cannot be installed.

SEE ALSO

tyCoDrv, tyCoDevCreate( )


solaris : Routines

tyCoDevCreate( )

NAME

tyCoDevCreate( ) - create a device for the onboard ports

SYNOPSIS

STATUS tyCoDevCreate
    (
    char * name,      /* name to use for this device */
    int    channel,   /* physical channel for this device */
    int    rdBufSize, /* read buffer size, in bytes */
    int    wrtBufSize /* write buffer size, in bytes */
    )

DESCRIPTION

This routine creates a device on one of the serial ports. Each port to be used should have exactly one device associated with it, by calling this routine.

For instance, to create the device "/tyCo/0", with buffer sizes of 512 bytes, the proper call would be:

    tyCoDevCreate ("/tyCo/0", 0, 512, 512);

RETURNS

OK, or ERROR if the driver is not installed, the channel is invalid, or the device already exists.

ERRNO

S_ioLib_NO_DRIVER

SEE ALSO

tyCoDrv( )