From 2cb191f8c145a2e64063812caf536e6d5638717d Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Sat, 21 Feb 2004 15:38:52 +0000 Subject: [PATCH] disable analog triggerring so pfi0 works --- comedi/drivers/ni_mio_common.c | 7 ++++++- comedi/drivers/ni_stc.h | 10 ++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index d26006dd..d89f16de 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -1599,7 +1599,7 @@ static int ni_ai_cmd(comedi_device *dev,comedi_subdevice *s) int start_stop_select=0; unsigned int stop_count; int interrupt_a_enable=0; - + MDPRINTK("ni_ai_cmd\n"); win_out(1,ADC_FIFO_Clear); @@ -1609,6 +1609,11 @@ static int ni_ai_cmd(comedi_device *dev,comedi_subdevice *s) /* start configuration */ win_out(AI_Configuration_Start,Joint_Reset_Register); + /* disable analog triggering for now, since it + * interferes with the use of pfi0 */ + devpriv->an_trig_etc_reg &= ~Analog_Trigger_Enable; + win_out(devpriv->an_trig_etc_reg, Analog_Trigger_Etc_Register); + switch(cmd->start_src){ case TRIG_INT: case TRIG_NOW: diff --git a/comedi/drivers/ni_stc.h b/comedi/drivers/ni_stc.h index de8f70bc..a2332fbb 100644 --- a/comedi/drivers/ni_stc.h +++ b/comedi/drivers/ni_stc.h @@ -553,11 +553,13 @@ enum AO_Personal_Bits #define G1_Arm _bit0 /*Analog_Trigger_Etc_Register*/ -/*This is mainly a counter/timer register */ -#define GPFO_1_Output_Enable _bit15 -#define GPFO_0_Output_Enable _bit14 -#define GPFO_0_Output_Select(a) ((a)<<11) +#define Analog_Trigger_Mode(x) ((x) & 0x7) +#define Analog_Trigger_Enable _bit3 +#define Analog_Trigger_Drive _bit4 #define GPFO_1_Output_Select _bit7 +#define GPFO_0_Output_Select(a) ((a)<<11) +#define GPFO_0_Output_Enable _bit14 +#define GPFO_1_Output_Enable _bit15 /* Additional windowed registers unique to E series */ -- 2.26.2