
TPMC118-SW-95 – QNX6 Neutrino Device Driver
Page 12 of 30
EXAMPLE
int
fd;
int
result;
TP118_READENC encBuf;
...
/*
** read encoder value of channel 1
*/
encBuf.channel = 1;
result = devctl(
fd,
DCMD_TP118_READENC,
&encBuf,
sizeof(encBuf),
NULL);
if (result == EOK)
{
/* successful read */
}
...
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()