- From: Frank Mori Hess <fmhess_at_verizon.net>
- Date: Mon, 28 Feb 2005 20:24:20 -0500
On Monday 28 February 2005 09:24 am, Bernd Porr wrote: > Dear all, > > does it make harm if we change the "data==0" into "data>=0" in > comedi_to_phys? > > The reason is that I use bit #12 to signal an out-of-range with a 12 bit > A/D converter. Bits 0 to 11 carry the data. 0..4095 is the "normal" > range and values from 4096 to 8191 signal out of range. > The driver shouldn't return any values larger than maxdata. The user isn't required to use comedi_to_phys() after all, or may have changed the the oor behavior. Plus any scheme you come up with won't be useful in general since 16 bit cards don't have any spare bits to play with. By having a seperate out-of-range bit, you are only adding two more useful values, from 4094 to 4096 on a 12 bit card. That's only 0.02% improvement in resolution. -- Frank
Attachments
- application/pgp-signature attachment: stored
Received on 2005-03-01Z01:24:20