ols: Make external clock setting queriable
authorv1ne <v1ne2go@gmail.com>
Tue, 31 Mar 2020 22:05:37 +0000 (00:05 +0200)
committerGerhard Sittig <gerhard.sittig@gmx.net>
Wed, 6 Jan 2021 09:45:28 +0000 (10:45 +0100)
... and thus selectable in PulseView.

src/hardware/openbench-logic-sniffer/api.c

index 2815a50a9861ab5d5369a0bad4a0daad288122b4..23f68c57545395477e1b9dc9bf8431f16f8e4493 100644 (file)
@@ -36,7 +36,7 @@ static const uint32_t devopts[] = {
        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_EXTERNAL_CLOCK | SR_CONF_SET,
+       SR_CONF_EXTERNAL_CLOCK | SR_CONF_GET | SR_CONF_SET,
        SR_CONF_CLOCK_EDGE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
        SR_CONF_PATTERN_MODE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
        SR_CONF_SWAP | SR_CONF_SET,
@@ -229,6 +229,10 @@ static int config_get(uint32_t key, GVariant **data,
        case SR_CONF_RLE:
                *data = g_variant_new_boolean(devc->capture_flags & CAPTURE_FLAG_RLE ? TRUE : FALSE);
                break;
+       case SR_CONF_EXTERNAL_CLOCK:
+               *data = g_variant_new_boolean(
+                       devc->capture_flags & CAPTURE_FLAG_CLOCK_EXTERNAL ? TRUE : FALSE);
+               break;
        case SR_CONF_CLOCK_EDGE:
                *data = g_variant_new_string(external_clock_edges[
                        devc->capture_flags & CAPTURE_FLAG_INVERT_EXT_CLOCK ? 1 : 0]);