From: Joel Holdsworth Date: Mon, 7 May 2012 15:42:50 +0000 (+0100) Subject: fx2lafw: Added support for 20kHz and 25kHz sampling X-Git-Tag: libsigrok-0.1.1~21 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=79dc64985f7e50943562169aebd7eefbd6e13490;p=libsigrok.git fx2lafw: Added support for 20kHz and 25kHz sampling --- diff --git a/hardware/fx2lafw/command.c b/hardware/fx2lafw/command.c index fe16506a..b5ccbf46 100644 --- a/hardware/fx2lafw/command.c +++ b/hardware/fx2lafw/command.c @@ -68,7 +68,11 @@ SR_PRIV int command_start_acquisition(libusb_device_handle *devhdl, if ((SR_MHZ(48) % samplerate) == 0) { cmd.flags = CMD_START_FLAGS_CLK_48MHZ; delay = SR_MHZ(48) / samplerate - 1; - } else if ((SR_MHZ(30) % samplerate) == 0) { + if(delay > MAX_SAMPLE_DELAY) + delay = 0; + } + + if (delay == 0 && (SR_MHZ(30) % samplerate) == 0) { cmd.flags = CMD_START_FLAGS_CLK_30MHZ; delay = SR_MHZ(30) / samplerate - 1; } diff --git a/hardware/fx2lafw/fx2lafw.c b/hardware/fx2lafw/fx2lafw.c index 89bb18bf..8132251f 100644 --- a/hardware/fx2lafw/fx2lafw.c +++ b/hardware/fx2lafw/fx2lafw.c @@ -94,6 +94,8 @@ static const char *probe_names[] = { }; static uint64_t supported_samplerates[] = { + SR_KHZ(20), + SR_KHZ(25), SR_KHZ(50), SR_KHZ(100), SR_KHZ(200),