]> sigrok.org Git - libsigrok.git/commitdiff
asix-sigma: Init cur_sample_rate
authorMarek Vasut <redacted>
Fri, 25 Apr 2014 16:03:47 +0000 (18:03 +0200)
committerBert Vermeulen <redacted>
Wed, 30 Apr 2014 16:45:52 +0000 (09:45 -0700)
Init the cur_sample_rate to 200kHz. This is now the default sample
rate for the ASIX Sigma if no other is specified by -c samplerate=N
on the command line. Without this change, the driver would crash on
SIGFPE because a division by zero would happen.

Signed-off-by: Marek Vasut <redacted>
hardware/asix-sigma/asix-sigma.c

index e2193fc8d7fb10459d3c001df388574b9301dfd9..c57ce367fa1075f46cdb0fa5f7007943f10f99d6 100644 (file)
@@ -360,7 +360,7 @@ static GSList *scan(GSList *options)
 
        sr_info("Found ASIX SIGMA - Serial: %s", serial_txt);
 
-       devc->cur_samplerate = 0;
+       devc->cur_samplerate = samplerates[0];
        devc->period_ps = 0;
        devc->limit_msec = 0;
        devc->cur_firmware = -1;