read acknowledges irq bit does have an effect on a 6601.
authorFrank Mori Hess <fmhess@speakeasy.net>
Fri, 17 Aug 2007 20:54:52 +0000 (20:54 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Fri, 17 Aug 2007 20:54:52 +0000 (20:54 +0000)
comedi/drivers/ni_tio.c

index 1b59cd8ea4d8629c337708b7fe4c3324ab3dad32..109b4cc24b734031cc1d81fbd9e14a074f1bcbb8 100644 (file)
@@ -704,8 +704,8 @@ static inline unsigned NI_M_Series_PFI_Gate_Select(unsigned n)
 #define Gi_Gate_Select_Shift 7
 enum Gi_Input_Select_Bits
 {
-       Gi_Read_Acknowledges_Irq = 0x1, // e-series only
-       Gi_Write_Acknowledges_Irq = 0x2,        // e-series only
+       Gi_Read_Acknowledges_Irq = 0x1,
+       Gi_Write_Acknowledges_Irq = 0x2,
        Gi_Source_Select_Mask = 0x7c,
        Gi_Gate_Select_Mask = 0x1f << Gi_Gate_Select_Shift,
        Gi_Gate_Select_Load_Source_Bit = 0x1000,
@@ -2356,26 +2356,23 @@ int ni_tio_winsn(struct ni_gpct *counter,
 static void ni_tio_configure_dma(struct ni_gpct *counter, short enable, short read_not_write)
 {
        struct ni_gpct_device *counter_dev = counter->counter_dev;
+       unsigned input_select_bits = 0;
 
-       switch(counter_dev->variant)
+       if(enable)
        {
-       case ni_gpct_variant_e_series:
+               if(read_not_write)
                {
-                       unsigned input_select_bits = 0;
-
-                       if(enable)
-                       {
-                               if(read_not_write)
-                               {
-                                       input_select_bits |= Gi_Read_Acknowledges_Irq;
-                               }else
-                               {
-                                       input_select_bits |= Gi_Write_Acknowledges_Irq;
-                               }
-                       }
-                       ni_tio_set_bits(counter, NITIO_Gi_Input_Select_Reg(counter->counter_index),
-                               Gi_Read_Acknowledges_Irq | Gi_Write_Acknowledges_Irq, input_select_bits);
+                       input_select_bits |= Gi_Read_Acknowledges_Irq;
+               }else
+               {
+                       input_select_bits |= Gi_Write_Acknowledges_Irq;
                }
+       }
+       ni_tio_set_bits(counter, NITIO_Gi_Input_Select_Reg(counter->counter_index),
+               Gi_Read_Acknowledges_Irq | Gi_Write_Acknowledges_Irq, input_select_bits);
+       switch(counter_dev->variant)
+       {
+       case ni_gpct_variant_e_series:
                break;
        case ni_gpct_variant_m_series:
        case ni_gpct_variant_660x: