]> sigrok.org Git - libsigrok.git/commitdiff
gwinstek-gds-800: Allow retrieving frame limit
authorValentin Ochs <redacted>
Sat, 27 Jun 2020 20:44:04 +0000 (22:44 +0200)
committerValentin Ochs <redacted>
Sat, 27 Jun 2020 20:56:10 +0000 (22:56 +0200)
src/hardware/gwinstek-gds-800/api.c

index 9d45266e9c616b619323718943e9d15fa27a6218..22ac40e6c77ef0192e64601f24d53abf8aecd00c 100644 (file)
@@ -30,7 +30,7 @@ static const uint32_t drvopts[] = {
 };
 
 static const uint32_t devopts[] = {
-       SR_CONF_LIMIT_FRAMES | SR_CONF_SET,
+       SR_CONF_LIMIT_FRAMES | SR_CONF_GET | SR_CONF_SET,
        SR_CONF_SAMPLERATE | SR_CONF_GET,
 };
 
@@ -132,6 +132,9 @@ static int config_get(uint32_t key, GVariant **data,
        case SR_CONF_SAMPLERATE:
                *data = g_variant_new_uint64(devc->sample_rate);
                break;
+       case SR_CONF_LIMIT_FRAMES:
+               *data = g_variant_new_uint64(devc->frame_limit);
+               break;
        default:
                return SR_ERR_NA;
        }