VxWorks API Reference : Driver Libraries
ppc555SciSio - MPC555 SCI serial driver
ppc555SciDevInit( ) - initialize a PPC555SCI channel
ppc555SciDevInit2( ) - initialize a PPC555SCI, part 2
ppc555SciInt( ) - handle a channel's interrupt
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.
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.
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.
This driver supports both polled and interrupt modes.
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( ).
drv/sio/ppc555SciSio.h sioLib.h
Section 14 QUEUED SERIAL MULTI-CHANNEL MODULE, MPC555 User’s Manual
ppc555SciDevInit( ) - initialize a PPC555SCI channel
void ppc555SciDevInit ( PPC555SCI_CHAN * pChan )
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.
N/A
ppc555SciDevInit2( ) - initialize a PPC555SCI, part 2
void ppc555SciDevInit2 ( PPC555SCI_CHAN * pChan /* device to initialize */ )
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.
N/A
ppc555SciInt( ) - handle a channel's interrupt
void ppc555SciInt ( PPC555SCI_CHAN * pChan /* channel generating the interrupt */ )
N/A