]> sigrok.org Git - libsigrok.git/commitdiff
beaglelogic: Changes for proper operation in PulseView
authorKumar Abhishek <redacted>
Sat, 23 Sep 2017 06:38:21 +0000 (12:08 +0530)
committerUwe Hermann <redacted>
Tue, 26 Sep 2017 16:14:46 +0000 (18:14 +0200)
Set samplelimit to a sane value (was causing PulseView to
crash earlier), as well as advertise samplerate using SR_CONF_LIST
so that PulseView can show the sample rates.

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

index 3188d8f3dc2d462684864b28df2ada7cbd5eb4a6..25ac0a6e871ec04be9368498d516bfcbb759989e 100644 (file)
@@ -33,7 +33,7 @@ static const uint32_t drvopts[] = {
 static const uint32_t devopts[] = {
        SR_CONF_CONTINUOUS,
        SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
-       SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET,
+       SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
        SR_CONF_TRIGGER_MATCH | SR_CONF_LIST,
        SR_CONF_CAPTURE_RATIO | SR_CONF_GET | SR_CONF_SET,
        SR_CONF_NUM_LOGIC_CHANNELS | SR_CONF_GET,
@@ -67,7 +67,7 @@ static struct dev_context *beaglelogic_devc_alloc(void)
 
        /* Default non-zero values (if any) */
        devc->fd = -1;
-       devc->limit_samples = (uint64_t)-1;
+       devc->limit_samples = (uint64_t)10000000;
        devc->tcp_buffer = 0;
 
        return devc;