ni_labpc: set up command4 register *after* command3 register
authorIan Abbott <abbotti@mev.co.uk>
Tue, 22 Jan 2013 11:33:37 +0000 (11:33 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Tue, 22 Jan 2013 12:28:49 +0000 (12:28 +0000)
commita6c04a29951077b153ee79075ddc7d7d423bd23e
tree943ea3735b9c4092f889ecbaf32879ff336d1cd1
parent1847c11424a039d71b56706af805e0de1adbc278
ni_labpc: set up command4 register *after* command3 register

Tuomas <tvainikk _at_ gmail _dot_ com> reported problems getting
meaningful output from a Lab-PC+ in differential mode for AI cmds,
but AI insn reads gave correct readings.  He tracked it down to two
problems, one of which is addressed by this patch.

It seems that writing to the command3 register after writing to the
command4 register in labpc_ai_cmd() messes up the differential reference
bit setting in the command4 register.  Set up the command4 register
after the command3 register (as in labpc_ai_rinsn()) to avoid the
problem.

Thanks to Tuomas for suggesting the fix.

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