From 4a17c85fda9e6e639c801e2f6794f47acd9045ce Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Wed, 19 Apr 2006 02:10:10 +0000 Subject: [PATCH] Patch from terry1@beam.ltd.uk (Terry Barnaby): There was a bug in the PCI-6143 code in the ni_pcimio driver which stopped the device being set to high sampling rates. The enclosed patch fixes this. --- comedi/drivers/ni_mio_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index 0e72d7c3..3277cf53 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -1658,7 +1658,7 @@ static int ni_ai_cmdtest(comedi_device *dev,comedi_subdevice *s,comedi_cmd *cmd) tmp=cmd->convert_src; sources = TRIG_TIMER | TRIG_EXT; - if(boardtype.reg_type == ni_reg_611x) sources |= TRIG_NOW; + if((boardtype.reg_type == ni_reg_611x) || (boardtype.reg_type == ni_reg_6143)) sources |= TRIG_NOW; cmd->convert_src &= sources; if(!cmd->convert_src || tmp!=cmd->convert_src)err++; @@ -1734,7 +1734,7 @@ static int ni_ai_cmdtest(comedi_device *dev,comedi_subdevice *s,comedi_cmd *cmd) } } if(cmd->convert_src==TRIG_TIMER){ - if(boardtype.reg_type == ni_reg_611x){ + if((boardtype.reg_type == ni_reg_611x) || (boardtype.reg_type == ni_reg_6143)){ if(cmd->convert_arg != 0){ cmd->convert_arg = 0; err++; @@ -1801,7 +1801,7 @@ static int ni_ai_cmdtest(comedi_device *dev,comedi_subdevice *s,comedi_cmd *cmd) if(tmp!=cmd->scan_begin_arg)err++; } if(cmd->convert_src==TRIG_TIMER){ - if(boardtype.reg_type != ni_reg_611x){ + if((boardtype.reg_type != ni_reg_611x) && (boardtype.reg_type != ni_reg_6143)){ tmp=cmd->convert_arg; ni_ns_to_timer(&cmd->convert_arg,cmd->flags&TRIG_ROUND_MASK); if(tmp!=cmd->convert_arg)err++; -- 2.26.2