TPMC866-SW-42 - VxWorks Device Driver
Page 26 of 37
4.5.3 FIODATABITS
This I/O control function selects the number of data bits in one word for the specific channel.
The function specific control parameter
arg
passes the selected value to the device driver. The
following values are possible:
value
description
TP866DB_5
use 5 data bits
TP866DB_6
use 6 data bits
TP866DB_7
use 7 data bits
TP866DB_8
use 8 data bits
EXAMPLE
#include
"tpmc866.h”
int
fd;
int
result;
…
/*-------------------------------------
Set channel to a word length of 7 bit
-------------------------------------*/
result = ioctl (fd, FIODATABITS, TP866DB_7);
if (result == OK)
{
/* Success */
}
else
{
/* Function failed */
}
ERROR CODES
Error code
Description
S_tp866Drv_IARG
Invalid parameter specified