
TPMC118-SW-95 – QNX6 Neutrino Device Driver
Page 17 of 30
3.3.4 DCMD_TP118_SETRES
NAME
DCMD_TP118_SETRES – Set new encoder channel resolution
DESCRIPTION
This devctl function changes the resolution of the specified encoder channel. A pointer to the callers
message buffer (
TP118_SETMODE
) and the size of this structure is passed by the parameters
data_ptr
and
n_bytes
to the device.
The
TP118_SETMODE
structure has the following layout:
typedef struct
{
int
channel;
unsigned
char
mode;
} TP118_SETMODE, *PTP118_SETMODE;
channel
This argument specifies the encoder channel which configuration shall be changed. Valid
values are 1 up to 6.
mode
This parameter specifies the new encoder resolution. Valid values are:
Value Description
TP118_ENCCNT_OFF
The encoder channel is disabled
TP118_ENCCNT_X1
The encoder counts in simple resolution
TP118_ENCCNT_X2
The encoder counts in double resolution
TP118_ENCCNT_X4
The encoder counts in quadruple resolution