patch from Tomasz, more fixes for ni_mio_cs.c
authorDavid Schleef <ds@schleef.org>
Sat, 27 May 2000 00:54:04 +0000 (00:54 +0000)
committerDavid Schleef <ds@schleef.org>
Sat, 27 May 2000 00:54:04 +0000 (00:54 +0000)
comedi/drivers/ni_atmio.c
comedi/drivers/ni_atmio16d.c
comedi/drivers/ni_mio_common.c
comedi/drivers/ni_mio_cs.c
comedi/drivers/ni_pcimio.c
comedi/drivers/ni_stc.h

index 475a45d86e79e3425efa972b47d93ffe258be51e..d0c16f3c7d132cdb27977c28d8236412c366b2b3 100644 (file)
@@ -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 */
 
index c43d54fd26358370ef17f01d6957d06d189221d1..e86912b74d03e60c6415bc5bef1333742b2ccfaf 100644 (file)
@@ -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;
                }
index d7306f85b2db178b757ba6502b0b4bc16c6a6264..e953454dc6649911f9d4db1e65009cdb5f0906e2 100644 (file)
@@ -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      ),
index 886bc3119bc4545ba97a566fc7341689164165c9..ced70b3a8ae1319c4f7d8471008866a20cf14ccc 100644 (file)
@@ -131,6 +131,8 @@ static ni_board ni_boards[]={
 
 #define IRQ_POLARITY 1
 
+#define NI_E_IRQ_FLAGS         SA_SHIRQ
+
 
 /* How we access registers */
 
index 6631443fa7028a620dec707e55056e3f090b16e5..15f56b9b8da6c8e060be63c18b571dc6645aa8fc 100644 (file)
@@ -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;
index 613fe1f7ba9251bb5bb9c9865e62a5f1d8cc12dc..1582a5a252e89ccc5241bbd23fefb7dc7e4af416 100644 (file)
@@ -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 */