From d8d29f1447b746161f7ebb6f9ba25ef191ddec3e Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Wed, 30 Jul 2008 13:13:22 +0000 Subject: [PATCH] We don't need to clear the AO_Update_Timed bit on all unused ao channels unless we are configuring the chanlist for a command. --- comedi/drivers/ni_mio_common.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index 138c3990..4ae634cc 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -2810,10 +2810,12 @@ static int ni_m_series_ao_config_chanlist(comedi_device * dev, int i; int invert = 0; - for (i = 0; i < boardtype.n_aochan; ++i) { - devpriv->ao_conf[i] &= ~MSeries_AO_Update_Timed_Bit; - ni_writeb(devpriv->ao_conf[i], M_Offset_AO_Config_Bank(i)); - ni_writeb(0xf, M_Offset_AO_Waveform_Order(i)); + if(timed) { + for (i = 0; i < boardtype.n_aochan; ++i) { + devpriv->ao_conf[i] &= ~MSeries_AO_Update_Timed_Bit; + ni_writeb(devpriv->ao_conf[i], M_Offset_AO_Config_Bank(i)); + ni_writeb(0xf, M_Offset_AO_Waveform_Order(i)); + } } for (i = 0; i < n_chans; i++) { const comedi_krange *krange; -- 2.26.2