
TPMC118-SW-95 – QNX6 Neutrino Device Driver
Page 22 of 30
EXAMPLE
int
fd;
int
result;
TP118_SETMODE modeBuf;
...
/*
** set up channel 2 in index mode
*/
modeBuf.channel =
2;
modeBuf.mode
=
TP118_ENC_INDEX;
result = devctl(
fd,
DCMD_TP118_SETMODE,
&modeBuf,
sizeof(modeBuf),
NULL);
if (result == EOK)
{
/* successful set */
}
...
ERRORS
EINVAL
Invalid argument. This error code is returned if either the size of the
message buffer is too small, or the specified parameter is out of
range.
SEE ALSO
Library Reference - devctl()