Added SDF_SOFT_CALIBRATED subdevice flag.
authorFrank Mori Hess <fmhess@speakeasy.net>
Thu, 7 Sep 2006 14:44:33 +0000 (14:44 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Thu, 7 Sep 2006 14:44:33 +0000 (14:44 +0000)
comedi/drivers/ni_mio_common.c
include/linux/comedi.h

index d3ff9904d757e8e513d05597ee422f97b698e072..4f7456f8f7b74353ba928e9d98aa9b44cf758b85 100644 (file)
@@ -3042,6 +3042,8 @@ static int ni_E_init(comedi_device *dev,comedi_devconfig *it)
                        s->subdev_flags |= SDF_GROUND | SDF_COMMON | SDF_OTHER;
                if(boardtype.adbits > 16)
                        s->subdev_flags |= SDF_LSAMPL;
+               if(boardtype.reg_type == ni_reg_m_series)
+                       s->subdev_flags |= SDF_SOFT_CALIBRATED;
                s->n_chan=boardtype.n_adchan;
                s->len_chanlist=512;
                s->maxdata=(1<<boardtype.adbits)-1;
@@ -3064,6 +3066,8 @@ static int ni_E_init(comedi_device *dev,comedi_devconfig *it)
                dev->write_subdev=s;
                s->type=COMEDI_SUBD_AO;
                s->subdev_flags=SDF_WRITABLE|SDF_DEGLITCH|SDF_GROUND;
+               if(boardtype.reg_type == ni_reg_m_series)
+                       s->subdev_flags |= SDF_SOFT_CALIBRATED;
                s->n_chan=boardtype.n_aochan;
                s->maxdata=(1<<boardtype.aobits)-1;
                s->range_table = boardtype.ao_range_table;
index f18d55c4ab68eb7eb5dc905bab2a4af6fb7f1e11..63707b5c4229e131c578c9a64b04c109037712ba 100644 (file)
@@ -180,6 +180,7 @@ typedef unsigned short sampl_t;
 #define SDF_MODE3      0x0400          /* can do mode 3 */
 #define SDF_MODE4      0x0800          /* can do mode 4 */
 #define SDF_CMD                0x1000          /* can do commands */
+#define SDF_SOFT_CALIBRATED    0x2000  /* subdevice uses software calibration */
 
 #define SDF_READABLE   0x00010000      /* subdevice can be read (e.g. analog input) */
 #define SDF_WRITABLE   0x00020000      /* subdevice can be written (e.g. analog output) */
@@ -457,7 +458,7 @@ struct comedi_bufinfo_struct{
 // X2 encoding
 #define GPCT_X2                 0x02
 // X3 encoding
-#define GPCT_X4                 0x04 
+#define GPCT_X4                 0x04
 // When to take into account the indexpulse:
 #define GPCT_IndexPhaseHighHigh 0
 #define GPCT_IndexPhaseLowHigh 1