]> sigrok.org Git - libsigrok.git/commitdiff
fx2lafw: allow for sampling at 48MHz, matching a fw change
authorKate J. Temkin <redacted>
Thu, 22 Aug 2019 01:12:33 +0000 (19:12 -0600)
committerUwe Hermann <redacted>
Tue, 1 Oct 2019 21:52:00 +0000 (23:52 +0200)
src/hardware/fx2lafw/api.c
src/hardware/fx2lafw/protocol.c

index d107191663a820af2f7ccdb3115bb08b507f428d..04efcf3f6abba45d47dab0a2974a8f3c56c97e90 100644 (file)
@@ -157,6 +157,7 @@ static const uint64_t samplerates[] = {
        SR_MHZ(12),
        SR_MHZ(16),
        SR_MHZ(24),
+       SR_MHZ(48),
 };
 
 static gboolean is_plausible(const struct libusb_device_descriptor *des)
index ec2b5c011b27ab94add03bfde6e211c2f76ef3f9..83315808d0eca129d1e37503d0375ec22de8f250 100644 (file)
@@ -112,7 +112,7 @@ static int command_start_acquisition(const struct sr_dev_inst *sdi)
        sr_dbg("GPIF delay = %d, clocksource = %sMHz.", delay,
                (cmd.flags & CMD_START_FLAGS_CLK_48MHZ) ? "48" : "30");
 
-       if (delay <= 0 || delay > MAX_SAMPLE_DELAY) {
+       if (delay < 0 || delay > MAX_SAMPLE_DELAY) {
                sr_err("Unable to sample at %" PRIu64 "Hz.", samplerate);
                return SR_ERR;
        }