disable analog triggerring so pfi0 works
authorFrank Mori Hess <fmhess@speakeasy.net>
Sat, 21 Feb 2004 15:38:52 +0000 (15:38 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Sat, 21 Feb 2004 15:38:52 +0000 (15:38 +0000)
comedi/drivers/ni_mio_common.c
comedi/drivers/ni_stc.h

index d26006dd206659101e63071beaade50d514d82c6..d89f16de9cafac04f3695d368398c800a6689c35 100644 (file)
@@ -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:
index de8f70bc1a149806619f5a5d78f195a2eff96300..a2332fbbc34fc2f881974045a22d36498e0b9f71 100644 (file)
@@ -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 */