02.03.2014 Views

BSP Developer's Guide

BSP Developer's Guide

BSP Developer's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

VxWorks 5.5<br />

<strong>BSP</strong> Developer’s <strong>Guide</strong><br />

int (*pollInput)<br />

int (*pollOutput)<br />

};<br />

SIO_CHAN *<br />

int<br />

STATUS<br />

void *<br />

);<br />

(<br />

SIO_CHAN *<br />

char *<br />

(<br />

SIO_CHAN *<br />

char outChar<br />

);<br />

pSioChan,<br />

callbackType,<br />

(*callback)(),<br />

callbackArg<br />

pSioChan,<br />

inChar);<br />

pSioChan,<br />

The members of the SIO_DRV_FUNCS structure function as follows:<br />

ioctl<br />

Points to the standard I/O control interface function for the driver. This<br />

function provides the primary control interface for any driver. To access the<br />

I/O control services for a standard SIO device, use the following symbolic<br />

constants:<br />

SIO_BAUD_SET<br />

SIO_BAUD_GET<br />

SIO_HW_OPTS_SET<br />

SIO_HW_OPTS_GET<br />

SIO_MODE_SET<br />

SIO_MODE_GET<br />

SIO_AVAIL_MODES_GET<br />

SIO_OPEN<br />

SIO_HUP<br />

Set a new baud rate.<br />

Get the current baud rate.<br />

Set new hardware settings.<br />

Get current hardware settings.<br />

Set a new operating mode.<br />

Get the current mode.<br />

Get available modes.<br />

Open a channel.<br />

Close a channel.<br />

txStartup<br />

Provides a pointer to the function that the system calls when new data is<br />

available for transmission. Typically, this routine is called only from the<br />

ttyDrv.o module. This module provides a higher level of functionality that<br />

makes a raw serial channel behave with line control and canonical character<br />

processing).<br />

callbackInstall<br />

Provides the driver with pointers to callback functions that the driver can call<br />

asynchronously to handle character puts and gets. The driver is responsible for<br />

saving the callback routines and arguments that it receives from the<br />

callbackInstall( ) function.The available callbacks are<br />

SIO_CALLBACK_GET_TX_CHAR and SIO_CALLBACK_PUT_RCV_CHAR.<br />

250

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!