Added PCI-6713 and PCI-6711 board definitions. Added disable
authorDavid Schleef <ds@schleef.org>
Mon, 23 Apr 2001 20:23:53 +0000 (20:23 +0000)
committerDavid Schleef <ds@schleef.org>
Mon, 23 Apr 2001 20:23:53 +0000 (20:23 +0000)
of AI subdevice if no AI capability.

comedi/drivers/ni_mio_common.c
comedi/drivers/ni_pcimio.c

index 0d030166b8c75761133f24ed7af1a1b65795e15b..53824a0fc749eae4bdc5f7d784ceb5672544afd0 100644 (file)
@@ -1819,18 +1819,22 @@ static int ni_E_init(comedi_device *dev,comedi_devconfig *it)
        /* analog input subdevice */
 
        s=dev->subdevices+0;
-       dev->read_subdev=s;
-       s->type=COMEDI_SUBD_AI;
-       s->subdev_flags=SDF_READABLE|SDF_RT|SDF_GROUND|SDF_COMMON|SDF_DIFF|SDF_OTHER;
-       s->subdev_flags|=SDF_DITHER;
-       s->n_chan=boardtype.n_adchan;
-       s->len_chanlist=512;    /* XXX is this the same for PCI-MIO ? */
-       s->maxdata=(1<<boardtype.adbits)-1;
-       s->range_table=ni_range_lkup[boardtype.gainlkup];
-       s->insn_read=ni_ai_insn_read;
-       s->do_cmdtest=ni_ai_cmdtest;
-       s->do_cmd=ni_ai_cmd;
-       s->cancel=ni_ai_reset;
+       if(boardtype.n_adchan){
+               dev->read_subdev=s;
+               s->type=COMEDI_SUBD_AI;
+               s->subdev_flags=SDF_READABLE|SDF_RT|SDF_GROUND|SDF_COMMON|SDF_DIFF|SDF_OTHER;
+               s->subdev_flags|=SDF_DITHER;
+               s->n_chan=boardtype.n_adchan;
+               s->len_chanlist=512;    /* XXX is this the same for PCI-MIO ? */
+               s->maxdata=(1<<boardtype.adbits)-1;
+               s->range_table=ni_range_lkup[boardtype.gainlkup];
+               s->insn_read=ni_ai_insn_read;
+               s->do_cmdtest=ni_ai_cmdtest;
+               s->do_cmd=ni_ai_cmd;
+               s->cancel=ni_ai_reset;
+       }else{
+               s->type=COMEDI_SUBD_UNUSED;
+       }
 
        /* analog output subdevice */
 
@@ -1850,7 +1854,7 @@ static int ni_E_init(comedi_device *dev,comedi_devconfig *it)
                s->insn_write=ni_ao_insn_write;
                s->do_cmd=ni_ao_cmd;
                s->do_cmdtest=ni_ao_cmdtest;
-               s->len_chanlist = 2;
+               s->len_chanlist = boardtype.n_aochan;
        }else{
                s->type=COMEDI_SUBD_UNUSED;
        }
index b824712231711c0196b7168be31586092c6e101e..1f985567ca406668f90602590daaec67a8d212b0 100644 (file)
@@ -301,6 +301,7 @@ static ni_board ni_boards[]={
                alwaysdither:   1,
                gainlkup:       ai_gain_16,
                ai_speed:       3000,
+               n_aochan:       2,
                aobits:         16,
                ao_unipolar:    1,
                ao_fifo_depth:  2048,
@@ -327,11 +328,41 @@ static ni_board ni_boards[]={
                alwaysdither:   0,
                gainlkup:       ai_gain_14,
                ai_speed:       200,
+               n_aochan:       2,
                aobits:         12,
                ao_unipolar:    0,
                ao_fifo_depth:  2048,
                caldac:         type4,          /* XXX */
        },
+#if 0
+       {       device_id:      0x0000,         /* unknown */
+               name:           "pci-6711",
+               n_adchan:       0, 
+               adbits:         0,
+               ai_fifo_depth:  0,
+               alwaysdither:   0,
+               gainlkup:       0,
+               ai_speed:       0,
+               ao_chan:        4,
+               aobits:         12,
+               ao_unipolar:    0,
+               ao_fifo_depth:  8192,
+               caldac:         type4,          /* XXX */
+       },
+#endif
+       {       device_id:      0x1870,
+               name:           "pci-6713",
+               n_adchan:       0, 
+               adbits:         0,
+               ai_fifo_depth:  0,
+               alwaysdither:   0,
+               gainlkup:       0,
+               ai_speed:       0,
+               ao_chan:        8,
+               aobits:         12,
+               ao_unipolar:    0,
+               ao_fifo_depth:  16384,
+               caldac:         type4,          /* XXX */
 #if 0
        {       device_id:      0x0000,         /* unknown */
                name:           "pci-6040e",