
TPMC118-SW-95 – QNX6 Neutrino Device Driver
Page 23 of 30
3.3.7 DCMD_TP118_SYNCON
NAME
DCMD_TP118_SYNCON – Add the specified channel to synchronous channel set
DESCRIPTION
This devctl function adds the specified encoder channel to the synchronized channel set. A pointer to
the callers message buffer (
TP118_SYNC
) and the size of this structure is passed by the parameters
data_ptr
and
n_bytes
to the device.
The
TP118_SYNC
structure has the following layout:
typedef struct
{
int
channel;
} TP118_SYNC, *PTP118_SYNC;
channel
This argument specifies the encoder channel that shall be used in synchronized mode. Valid
values are 1 up to 6.
EXAMPLE
int
fd;
int
result;
TP118_SYNC syncBuf;
...
/*
** add channel 3 to synchronized mode
*/
syncBuf.channel =
3;
result = devctl(
fd,
DCMD_TP118_SYNCON,
&syncBuf,
sizeof(syncBuf),
NULL);
if (result == EOK)
{
/* successful set */
}
...