
TPMC118-SW-95 – QNX6 Neutrino Device Driver
Page 21 of 30
3.3.6 DCMD_TP118_SETMODE
NAME
DCMD_TP118_SETMODE – Set new encoder channel reference/index mode
DESCRIPTION
This devctl function changes the reference/index mode 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_ENC_NONREF
The encoder will work in non reference mode
TP118_ENC_REF
The encoder will work in reference mode
TP118_ENC_AUTOREF
The encoder will work in auto reference mode
TP118_ENC_INDEX
The encoder will work in index mode