From 8dba02bf808742780b146322a19ceec8c29be2b0 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sat, 27 May 2000 00:54:04 +0000 Subject: [PATCH] patch from Tomasz, more fixes for ni_mio_cs.c --- comedi/drivers/ni_atmio.c | 2 ++ comedi/drivers/ni_atmio16d.c | 8 ++++---- comedi/drivers/ni_mio_common.c | 12 ++++++------ comedi/drivers/ni_mio_cs.c | 2 ++ comedi/drivers/ni_pcimio.c | 2 ++ comedi/drivers/ni_stc.h | 2 -- 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/comedi/drivers/ni_atmio.c b/comedi/drivers/ni_atmio.c index 475a45d8..d0c16f3c 100644 --- a/comedi/drivers/ni_atmio.c +++ b/comedi/drivers/ni_atmio.c @@ -224,6 +224,8 @@ static int ni_irqpin[]={-1,-1,-1,0,1,2,-1,3,-1,-1,4,5,6,-1,-1,7}; #define IRQ_POLARITY 0 +#define NI_E_IRQ_FLAGS 0 + /* How we access registers */ diff --git a/comedi/drivers/ni_atmio16d.c b/comedi/drivers/ni_atmio16d.c index c43d54fd..e86912b7 100644 --- a/comedi/drivers/ni_atmio16d.c +++ b/comedi/drivers/ni_atmio16d.c @@ -415,10 +415,10 @@ static int atmio16d_ai_cmd(comedi_device *dev, comedi_subdevice *s) } else if(cmd->convert_arg<655360000) { base_clock = CLOCK_100_KHZ; timer = cmd->convert_arg/10000; - } else if(cmd->convert_arg<6553600000) { + } else if(cmd->convert_arg<=0xffffffff /* 6553600000 */ ) { base_clock = CLOCK_10_KHZ; timer = cmd->convert_arg/100000; - } else if(cmd->convert_arg<65536000000) { + } else if(cmd->convert_arg<=0xffffffff /* 65536000000 */ ) { base_clock = CLOCK_1_KHZ; timer = cmd->convert_arg/1000000; } @@ -481,10 +481,10 @@ static int atmio16d_ai_cmd(comedi_device *dev, comedi_subdevice *s) } else if(cmd->scan_begin_arg<655360000) { base_clock = CLOCK_100_KHZ; timer = cmd->scan_begin_arg/10000; - } else if(cmd->scan_begin_arg<6553600000) { + } else if(cmd->scan_begin_arg<0xffffffff /* 6553600000 */ ) { base_clock = CLOCK_10_KHZ; timer = cmd->scan_begin_arg/100000; - } else if(cmd->scan_begin_arg<65536000000) { + } else if(cmd->scan_begin_arg<0xffffffff /* 65536000000 */ ) { base_clock = CLOCK_1_KHZ; timer = cmd->scan_begin_arg/1000000; } diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index d7306f85..e953454d 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -94,20 +94,20 @@ static comedi_lrange range_ni_E_ai_limited={ 8, { RANGE( 0, 0.2 ), }}; static comedi_lrange range_ni_E_ai_limited14={ 14, { + RANGE( -10, 10 ), RANGE( -5, 5 ), - RANGE( -2.5, 2.5 ), + RANGE( -2, 2 ), RANGE( -1, 1 ), RANGE( -0.5, 0.5 ), - RANGE( -0.25, 0.25 ), + RANGE( -0.2, 0.2 ), RANGE( -0.1, 0.1 ), - RANGE( -0.05, 0.05 ), + RANGE( 0, 10 ), RANGE( 0, 5 ), - RANGE( 0, 2.5 ), + RANGE( 0, 2 ), RANGE( 0, 1 ), RANGE( 0, 0.5 ), - RANGE( 0, 0.25 ), + RANGE( 0, 0.2 ), RANGE( 0, 0.1 ), - RANGE( 0, 0.05 ), }}; static comedi_lrange range_ni_E_ai_limited_602x={ 8, { RANGE( -10, 10 ), diff --git a/comedi/drivers/ni_mio_cs.c b/comedi/drivers/ni_mio_cs.c index 886bc311..ced70b3a 100644 --- a/comedi/drivers/ni_mio_cs.c +++ b/comedi/drivers/ni_mio_cs.c @@ -131,6 +131,8 @@ static ni_board ni_boards[]={ #define IRQ_POLARITY 1 +#define NI_E_IRQ_FLAGS SA_SHIRQ + /* How we access registers */ diff --git a/comedi/drivers/ni_pcimio.c b/comedi/drivers/ni_pcimio.c index 6631443f..15f56b9b 100644 --- a/comedi/drivers/ni_pcimio.c +++ b/comedi/drivers/ni_pcimio.c @@ -374,6 +374,8 @@ comedi_driver driver_pcimio={ #define interrupt_pin(a) 0 #define IRQ_POLARITY 1 +#define NI_E_IRQ_FLAGS SA_SHIRQ + typedef struct{ int dio; diff --git a/comedi/drivers/ni_stc.h b/comedi/drivers/ni_stc.h index 613fe1f7..1582a5a2 100644 --- a/comedi/drivers/ni_stc.h +++ b/comedi/drivers/ni_stc.h @@ -503,8 +503,6 @@ static ni_board ni_boards[]; #define boardtype ni_boards[dev->board] -#define NI_E_IRQ_FLAGS 0 - #endif /* _COMEDI_NI_STC_H */ -- 2.26.2