TIP675-SW-42 – VxWorks Device Driver
Page 20 of 31
EXAMPLE
#include
"tip675.h"
…
int
fd;
int
retval;
T675_DIRECTION_STR
dBuf;
…
/*----------------------------------
Set direction: Line 1-24
– output
Line 25-32 – input
----------------------------------*/
dBuf.out_1_16 = 0xFFFF;
dBuf.out_17_32 = 0x00FF;
dBuf.out_33_48 = 0x0000;
retval = ioctl(fd, FIO_T675_SET_DIR, (int)&dBuf);
if (retval == ERROR)
{
/* handle function specific error conditions */
}
…
ERRORS
No function specific error codes.
SEE ALSO
ioLib, basic I/O routine - ioctl(), VxWorks Programmer's Guide: I/O System.