]> sigrok.org Git - sigrok-firmware-fx2lafw.git/blobdiff - hantek_6022be.c
scopes: Factor out SET_ANALOG_MODE().
[sigrok-firmware-fx2lafw.git] / hantek_6022be.c
index 232237eb1296b2147222d5c9db271450f4ce460d..84e37876e1d485bba87e4fbf150311cdcdf70bf7 100644 (file)
@@ -24,6 +24,8 @@
 #include <delay.h>
 #include <setupdat.h>
 
+#define SET_ANALOG_MODE()
+
 /* Change to support as many interfaces as you need. */
 static BYTE altiface = 0;
 
@@ -164,6 +166,8 @@ static void start_sampling(void)
 {
        int i;
 
+       SET_ANALOG_MODE();
+
        clear_fifo();
 
        for (i = 0; i < 1000; i++);
@@ -389,6 +393,8 @@ static void init(void)
        EP4CFG = 0;
        EP8CFG = 0;
 
+       SET_ANALOG_MODE();
+
        /* In idle mode tristate all outputs. */
        GPIFIDLECTL = 0x00; /* Don't enable CTL0-5 outputs. */
        GPIFCTLCFG = 0x80; /* TRICTL=1. CTL0-2: CMOS outputs, tri-statable. */