X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=sainsmart_dds120.c;h=26d099711203cfd76e348484486c1509bc710778;hb=be6d306de12082c887c30e364dcf66438acc6183;hp=a2867e5c52340bfd578f287bc5e99bf4b6ece1f5;hpb=3968bbfb63b0946841e4f2d78339523a55ef9124;p=sigrok-firmware-fx2lafw.git diff --git a/sainsmart_dds120.c b/sainsmart_dds120.c index a2867e5c..26d09971 100644 --- a/sainsmart_dds120.c +++ b/sainsmart_dds120.c @@ -24,6 +24,8 @@ #include #include +#define SET_ANALOG_MODE() PA7 = 1 + /* Change to support as many interfaces as you need. */ static BYTE altiface = 0; @@ -208,6 +210,8 @@ static void start_sampling(void) { int i; + SET_ANALOG_MODE(); + clear_fifo(); for (i = 0; i < 1000; i++); @@ -459,6 +463,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. */ @@ -509,7 +515,7 @@ static void main(void) OEC = 0xff; OEA = 0x80; - PA7 = 1; + SET_ANALOG_MODE(); while (TRUE) { if (dosud) {