s526: backwards compatible change for INSN_CONFIG_GPCT_QUADRATURE_ENCODER
authorIan Abbott <abbotti@mev.co.uk>
Mon, 29 Apr 2013 12:19:56 +0000 (13:19 +0100)
committerIan Abbott <abbotti@mev.co.uk>
Mon, 29 Apr 2013 12:19:56 +0000 (13:19 +0100)
commit2f0c46acfb99cd879363f4761a8f86ddf6a5a5f0
tree3495e3f272eb575e929b24e6d6cc0792673a4eb8
parenteea099003131499606e7af1f8ba94bc8949d687e
s526: backwards compatible change for INSN_CONFIG_GPCT_QUADRATURE_ENCODER

For INSN_CONFIG_GPCT_QUADRATURE_ENCODER, if insn->n < 2, use the fixed
counter mode register value that was in use before 2009-08-07, otherwise
read the counter mode register value from data[1].

Also, for INSN_CONFIG_GPCT_SINGLE_PULSE_GENERATOR and
INSN_CONFIG_GPCT_PULSE_TRAIN_GENERATOR, return an error if insn->n < 5.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
comedi/drivers/s526.c