
TPMC118-SW-95 – QNX6 Neutrino Device Driver
Page 29 of 30
3.3.10 DCMD_TP118_SETINTR
NAME
DCMD_TP118_SETINTR – Wait for Event on the specified digital input channel
DESCRIPTION
This devctl function waits on a specified event on a specified digital input channel or for a specified
time. A pointer to the callers message buffer (
TP118_INTR
) and the size of this structure is passed by
the parameters
data_ptr
and
n_bytes
to the device.
The
TP118_INTR
structure has the following layout:
typedef struct
{
int
channel;
int
edge;
int
timeout;
/* in seconds, -1 --> forever */
} TP118_INTR, *PTP118_INTR;
channel
This argument specifies the digital input channel to wait on. Valid values are 1 up to 6.
edge
This value specifies the transition to wait for. Valid values are:
Value Description
TP118_EDGE_HI
The function will wait for a Low to High transition
TP118_EDGE_LO
The function will wait for a High to Low transition
timeout
This value specifies the time that shall be waited at maximum. The time is specified in seconds.
If the specified time expires, the function will return with error.