don't write to ao fifo offset load register if it doesn't exist
authorFrank Mori Hess <fmhess@speakeasy.net>
Thu, 15 Jul 2004 22:30:24 +0000 (22:30 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Thu, 15 Jul 2004 22:30:24 +0000 (22:30 +0000)
comedi/drivers/ni_mio_common.c

index 0200ae9a24bf543608c60a2432bd98608c9fe553..ae54b94a6f787818a1344ce805ee380358829d92 100644 (file)
@@ -854,7 +854,8 @@ static int ni_ao_prep_fifo(comedi_device *dev,comedi_subdevice *s)
 
        /* reset fifo */
        win_out(0,DAC_FIFO_Clear);
-       ni_ao_win_outl(dev, 0x6, AO_FIFO_Offset_Load_611x);
+       if(boardtype.reg_type & ni_reg_6xxx_mask)
+               ni_ao_win_outl(dev, 0x6, AO_FIFO_Offset_Load_611x);
 
        /* load some data */
        n = comedi_buf_read_n_available(s);
@@ -2066,7 +2067,8 @@ static int ni_ao_inttrig(comedi_device *dev,comedi_subdevice *s,
        bits = AO_Error_Interrupt_Enable;
 #ifdef PCIDMA
        win_out(0, DAC_FIFO_Clear);
-       ni_ao_win_outl(dev, 0x6, AO_FIFO_Offset_Load_611x);
+       if(boardtype.reg_type & ni_reg_6xxx_mask)
+               ni_ao_win_outl(dev, 0x6, AO_FIFO_Offset_Load_611x);
        ni_ao_setup_MITE_dma(dev, &s->async->cmd);
        ret = ni_ao_wait_for_dma_load(dev);
        if(ret < 0) return ret;