projects
/
comedi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69b8d93
)
fixed bit mangling in analog input read insn for 16 bit das802/16
author
Frank Mori Hess
<fmhess@speakeasy.net>
Tue, 19 Jun 2001 16:16:35 +0000
(16:16 +0000)
committer
Frank Mori Hess
<fmhess@speakeasy.net>
Tue, 19 Jun 2001 16:16:35 +0000
(16:16 +0000)
comedi/drivers/das800.c
patch
|
blob
|
history
diff --git
a/comedi/drivers/das800.c
b/comedi/drivers/das800.c
index 32e56cc2808b8db3f7e692245bbc566d501f43c7..c426daf4b2780d3fc5b03b3d073a9b184165358f 100644
(file)
--- a/
comedi/drivers/das800.c
+++ b/
comedi/drivers/das800.c
@@
-858,7
+858,14
@@
static int das800_ai_rinsn(comedi_device *dev, comedi_subdevice *s, comedi_insn
}
lsb = inb(dev->iobase + DAS800_LSB);
msb = inb(dev->iobase + DAS800_MSB);
- data[n] = (lsb >> 4) | (msb << 4);
+ if(thisboard->resolution == 12)
+ {
+ data[n] = (lsb >> 4) & 0xff;
+ data[n] |= (msb << 4);
+ }else
+ {
+ data[n] = (msb << 8) | lsb;
+ }
}
return n;