From: Ralf Date: Tue, 15 Dec 2020 19:02:37 +0000 (+0100) Subject: fx2lafw: Unbreak SR_CONF_LIMIT_SAMPLES for large values (above 2**32) X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=6065d660e04b05e94bc31adc6fe0333ecadb040f;p=libsigrok.git fx2lafw: Unbreak SR_CONF_LIMIT_SAMPLES for large values (above 2**32) Capture does not stop for sample count values which exceed the range of a 32bit type variable. Adjust the data type to 64bit. How to reproduce: 8MSa/s * 600s -> 4,800,000,000 samples $ sigrok-cli -d fx2lafw -o capture.sr --config samplerate=8M --time 600000 [ gsi: rephrased the commit message ] --- diff --git a/src/hardware/fx2lafw/protocol.h b/src/hardware/fx2lafw/protocol.h index 3f240c59..2c56b02c 100644 --- a/src/hardware/fx2lafw/protocol.h +++ b/src/hardware/fx2lafw/protocol.h @@ -112,7 +112,7 @@ struct dev_context { struct soft_trigger_logic *stl; uint64_t num_frames; - unsigned int sent_samples; + uint64_t sent_samples; int submitted_transfers; int empty_transfer_count;