VxWorks API Reference : Driver Libraries

ppc555SciSio

NAME

ppc555SciSio - MPC555 SCI serial driver

ROUTINES

ppc555SciDevInit( ) - initialize a PPC555SCI channel
ppc555SciDevInit2( ) - initialize a PPC555SCI, part 2
ppc555SciInt( ) - handle a channel's interrupt

DESCRIPTION

This is the driver for SCIs of the QSMC the the Motorola PPC555. The SMC has two SCI channels. Both channels are compatible with earlier SCI devices from Motorola (eg. MC68332), with enhancements to allow external baud clock source and queued operation fro the first SCI channel.

DATA STRUCTURES

An PPC555SCI_CHAN data structure is used to describe each channel, this structure is described in h/drv/sio/ppc555SciSio.h. Based on the "options" field of this structure, the driver can work in queued or non-queued mode. Only the first SCI of the QSMC on the PowerPC 555 provides queued mode operation.

CALLBACKS

Servicing a "transmitter ready" interrupt involves making a callback to a higher level library in order to get a character to transmit. By default, this driver installs dummy callback routines which do nothing. A higher layer library that wants to use this driver (e.g. ttyDrv) will install its own callback routine using the SIO_INSTALL_CALLBACK ioctl command. Likewise, a receiver interrupt handler makes a callback to pass the character to the higher layer library.

MODES

This driver supports both polled and interrupt modes.

USAGE

The BSP's sysHwInit( ) routine typically calls sysSerialHwInit( ), which initializes all the values in the PPC555SCI_CHAN structure (except the SIO_DRV_FUNCS) before calling m68332DevInit( ).

The BSP's sysHwInit2( ) routine typically calls sysSerialHwInit2( ), which connects the chips interrupt (m68332Int) via intConnect( ).

INCLUDE FILES

drv/sio/ppc555SciSio.h sioLib.h

SEE ALSO

Section 14 QUEUED SERIAL MULTI-CHANNEL MODULE, MPC555 User’s Manual


Driver Libraries : Routines

ppc555SciDevInit( )

NAME

ppc555SciDevInit( ) - initialize a PPC555SCI channel

SYNOPSIS

void ppc555SciDevInit
    (
    PPC555SCI_CHAN * pChan
    )

DESCRIPTION

This routine initializes the driver function pointers and then resets the chip in a quiescent state. The BSP must have already initialized all the device addresses and the baudFreq fields in the PPC555SCI_CHAN structure before passing it to this routine.

RETURNS

N/A

SEE ALSO

ppc555SciSio


Driver Libraries : Routines

ppc555SciDevInit2( )

NAME

ppc555SciDevInit2( ) - initialize a PPC555SCI, part 2

SYNOPSIS

void ppc555SciDevInit2
    (
    PPC555SCI_CHAN * pChan    /* device to initialize */
    )

DESCRIPTION

This routine is called by the BSP after interrupts have been connected. The driver can now operate in interrupt mode. Before this routine is called only polled mode operations should be allowed.

RETURNS

N/A

SEE ALSO

ppc555SciSio


Driver Libraries : Routines

ppc555SciInt( )

NAME

ppc555SciInt( ) - handle a channel's interrupt

SYNOPSIS

void ppc555SciInt
    (
    PPC555SCI_CHAN * pChan    /* channel generating the interrupt */
    )

DESCRIPTION

RETURNS

N/A

SEE ALSO

ppc555SciSio