]> sigrok.org Git - libsigrok.git/commitdiff
beaglelogic: Enable seamless continuous capturing
authorKumar Abhishek <redacted>
Thu, 20 Jul 2017 14:37:02 +0000 (14:37 +0000)
committerUwe Hermann <redacted>
Tue, 26 Sep 2017 16:06:34 +0000 (18:06 +0200)
This is done by setting triggerflags to 1 unless SR_CONF_LIMIT_SAMPLES is set

Signed-off-by: Kumar Abhishek <redacted>
src/hardware/beaglelogic/api.c

index be80d00fa5e47cd0aff5a21fb3e724e38f13d871..c6fcace238e0b11c825fe79fa2d205600461bd69 100644 (file)
@@ -130,10 +130,14 @@ static int dev_open(struct sr_dev_inst *sdi)
        /* Get the default attributes */
        beaglelogic_get_samplerate(devc);
        beaglelogic_get_sampleunit(devc);
-       beaglelogic_get_triggerflags(devc);
        beaglelogic_get_buffersize(devc);
        beaglelogic_get_bufunitsize(devc);
 
+       /* Set the triggerflags to default for continuous capture unless we
+        * explicitly limit samples using SR_CONF_LIMIT_SAMPLES */
+       devc->triggerflags = BL_TRIGGERFLAGS_CONTINUOUS;
+       beaglelogic_set_triggerflags(devc);
+
        /* Map the kernel capture FIFO for reads, saves 1 level of memcpy */
        if (beaglelogic_mmap(devc) != SR_OK) {
                sr_err("Unable to map capture buffer");