TIP675-SW-42 – VxWorks Device Driver
Page 19 of 31
4.3.1 FIO_T675_SET_DIR
NAME
FIO_T675_SET_DIR – Set direction of I/O lines
DESCRIPTION
With this ioctl function each of the 48 I/O line may be individually set as input or output. After driver
startup all I/O lines are set to be inputs. To set a line to be input, set the corresponding bit in the mask
to 1.
The direction mask (
T675_DIRECTION_STR
) will be passed in the ioctl argument
arg
to the driver.
typedef struct
{
unsigned short
dir_1_16;
unsigned short
dir_17_32;
unsigned short
dir_33_48;
} T675_DIRECTION_STR;
dir_1_16
Specifies the line direction for I/O-line 1 up to 16. (Line 1 is assigned to bit 0, line 2 to bit 1 and
so on.)
dir_17_32
Specifies the line direction for I/O-line 17 up to 32. (Line 17 is assigned to bit 0, line 18 to bit 1
and so on.)
dir_33_48
Specifies the line direction for I/O-line 33 up to 48. (Line 33 is assigned to bit 0, line 34 to bit 1
and so on.)