
TPMC118-SW-95 – QNX6 Neutrino Device Driver
Page 18 of 30
EXAMPLE
int
fd;
int
result;
TP118_SETMODE modeBuf;
...
/*
** set up channel 2 in quadruple mode
*/
modeBuf.channel =
2;
modeBuf.mode
=
TP118_ENCCNT_X4;
result = devctl(
fd,
DCMD_TP118_SETRES,
&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()