projects
/
comedi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7fd975
)
Fix munging on 671x boards
author
David Schleef
<ds@schleef.org>
Fri, 5 Jul 2002 18:23:01 +0000
(18:23 +0000)
committer
David Schleef
<ds@schleef.org>
Fri, 5 Jul 2002 18:23:01 +0000
(18:23 +0000)
comedi/drivers/ni_mio_common.c
patch
|
blob
|
history
diff --git
a/comedi/drivers/ni_mio_common.c
b/comedi/drivers/ni_mio_common.c
index 77c93a7db1915dd8bbd608884ee3b00d3efc2bed..32c55c9a236ed079e57a35ed407619a9473ebef9 100644
(file)
--- a/
comedi/drivers/ni_mio_common.c
+++ b/
comedi/drivers/ni_mio_common.c
@@
-1855,11
+1855,14
@@
static int ni_ao_insn_write_671x(comedi_device *dev,comedi_subdevice *s,
comedi_insn *insn,lsampl_t *data)
{
unsigned int chan = CR_CHAN(insn->chanspec);
+ lsampl_t d;
ni_ao_config_chanlist(dev,s,&insn->chanspec,1);
- devpriv->ao[chan] = data[insn->n-1];
- ao_win_out(data[insn->n-1],DACx_Direct_Data_671x(chan));
+ d = data[insn->n-1];
+ devpriv->ao[chan] = d;
+ d -= 1 << (boardtype.aobits - 1);
+ ao_win_out(d,DACx_Direct_Data_671x(chan));
return insn->n;
}