From: Frank Mori Hess Date: Fri, 17 Aug 2007 20:54:52 +0000 (+0000) Subject: read acknowledges irq bit does have an effect on a 6601. X-Git-Tag: r0_7_75~40 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c38e710b1afbc4bc7ed53f0409c8e93fa9c89ddb;p=comedi.git read acknowledges irq bit does have an effect on a 6601. --- diff --git a/comedi/drivers/ni_tio.c b/comedi/drivers/ni_tio.c index 1b59cd8e..109b4cc2 100644 --- a/comedi/drivers/ni_tio.c +++ b/comedi/drivers/ni_tio.c @@ -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: