From f93034979b099d19640fbf8f2d9c0f865eae8916 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Wed, 20 Mar 2002 21:28:22 +0000 Subject: [PATCH] Fix ni_load_channelgain_list() for 611x. --- comedi/drivers/ni_mio_common.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index fe53315c..8f1d9c3a 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -1064,12 +1064,21 @@ static void ni_load_channelgain_list(comedi_device *dev,unsigned int n_chan, /* prime the channel/gain list */ win_out(1,AI_Command_1_Register); - for(i=0;i<1000;i++){ - if(!(win_in(AI_Status_1_Register)&AI_FIFO_Empty_St)){ - win_out(1,ADC_FIFO_Clear); - return; + if(boardtype.reg_611x){ + /* The 611x has screwy 32-bit FIFOs. */ + for(i=0;i