VxWorks Reference Manual : Libraries

ttyDrv

NAME

ttyDrv - provide terminal device access to serial channels

ROUTINES

ttyDrv( ) - initialize the tty driver
ttyDevCreate( ) - create a VxWorks device for a serial channel

DESCRIPTION

This library provides the OS-dependent functionality of a serial device, including canonical processing and the interface to the VxWorks I/O system.

The BSP provides "raw" serial channels which are accessed via an SIO_CHAN data structure. These raw devices provide only low level access to the devices to send and receive characters. This library builds on that functionality by allowing the serial channels to be accessed via the VxWorks I/O system using the standard read/write interface. It also provides the canonical processing support of tyLib.

The routines in this library are typically called by usrRoot( ) in usrConfig.c to create VxWorks serial devices at system startup time.

INCLUDE FILES

ttyLib.h

SEE ALSO

ttyDrv, tyLib, sioLib.h


Libraries : Routines

ttyDrv( )

NAME

ttyDrv( ) - initialize the tty driver

SYNOPSIS


STATUS ttyDrv (void)

DESCRIPTION

This routine initializes the tty driver, which is the OS interface to core serial channel(s). Normally, it is called by usrRoot( ) in usrConfig.c.

After this routine is called, ttyDevCreate( ) is typically called to bind serial channels to VxWorks devices.

RETURNS

OK, or ERROR if the driver cannot be installed.

SEE ALSO

ttyDrv


Libraries : Routines

ttyDevCreate( )

NAME

ttyDevCreate( ) - create a VxWorks device for a serial channel

SYNOPSIS

STATUS ttyDevCreate
    (
    char *     name,      /* name to use for this device */
    SIO_CHAN * pSioChan,  /* pointer to core driver structure */
    int        rdBufSize, /* read buffer size, in bytes */
    int        wrtBufSize /* write buffer size, in bytes */
    )

DESCRIPTION

This routine creates a device on a specified serial channel. Each channel 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:

    ttyDevCreate ("/tyCo/0", pSioChan, 512, 512);
Where pSioChan is the address of the underlying SIO_CHAN serial channel descriptor (defined in sioLib.h). This routine is typically called by usrRoot( ) in usrConfig.c

RETURNS

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

SEE ALSO

ttyDrv