Changed subdev_700_insn to include the state of the output channels
authorIan Abbott <abbotti@mev.co.uk>
Thu, 21 Feb 2008 12:36:10 +0000 (12:36 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Thu, 21 Feb 2008 12:36:10 +0000 (12:36 +0000)
(0 to 7) in the returned data.  This may be inaccurate unless the output
channels have been written at least once.

comedi/drivers/ni_daq_700.c

index f33f8b541680c470e999c365083b2bdb84ef704f..e12603ecdfd99afe566e6477e627a2c95a6b2a5a 100644 (file)
@@ -166,7 +166,8 @@ static int subdev_700_insn(comedi_device * dev, comedi_subdevice * s,
                                CALLBACK_ARG);
        }
 
-       data[1] = CALLBACK_FUNC(0, _700_DATA, 0, CALLBACK_ARG) << 8;    /* shift bits to 8-15 */
+       data[1] = s->state & 0xff;
+       data[1] |= CALLBACK_FUNC(0, _700_DATA, 0, CALLBACK_ARG) << 8;
 
        return 2;
 }