From: Frank Mori Hess Date: Tue, 7 Nov 2006 15:46:51 +0000 (+0000) Subject: Added init of ai static control reg for m series. X-Git-Tag: r0_7_74~160 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b736d297e505c7b63e81f2cf820333801d0271c4;p=comedi.git Added init of ai static control reg for m series. --- diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index b02bfa13..e9abf956 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -1231,6 +1231,15 @@ static void ni_ao_setup_MITE_dma(comedi_device *dev,comedi_cmd *cmd) #endif // PCIDMA +void ni_m_series_adc_reset(comedi_device *dev) +{ + ni_writeb(0, M_Offset_Static_AI_Control(0)); + ni_writeb(1, M_Offset_Static_AI_Control(0)); + devpriv->stc_writew(dev, AI_CONVERT_Pulse, AI_Command_1_Register); + devpriv->stc_writew(dev, AI_CONVERT_Pulse, AI_Command_1_Register); + devpriv->stc_writew(dev, AI_CONVERT_Pulse, AI_Command_1_Register); +} + /* used for both cancel ioctl and board initialization @@ -3340,6 +3349,8 @@ static int ni_E_init(comedi_device *dev,comedi_devconfig *it) /* ai configuration */ ni_ai_reset(dev,dev->subdevices+0); + if(boardtype.reg_type == ni_reg_m_series) + ni_m_series_adc_reset(dev); if((boardtype.reg_type & ni_reg_6xxx_mask) == 0){ // BEAM is this needed for PCI-6143 ?? devpriv->clock_and_fout =