X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-cli.git;a=blobdiff_plain;f=show.c;h=ee140374ab02500273483cebf2717ae9d8678eab;hp=6b2f9853b0fbf9731b0b237117f804fba2bc8ce3;hb=ec3d44c892c006baa6c2bf39017fc76181bbe8bf;hpb=21f6f69686721d53b44c2da8d138c8d85780b8d8 diff --git a/show.c b/show.c index 6b2f985..ee14037 100644 --- a/show.c +++ b/show.c @@ -20,6 +20,7 @@ #include "sigrok-cli.h" #include "config.h" #include +#include extern gint opt_loglevel; extern gchar *opt_pds; @@ -187,7 +188,11 @@ void show_dev_detail(void) g_variant_unref(gvar_opts); } + /* Selected probes and probe group may affect which options are + * returned, or which values for them. */ + select_probes(sdi); probe_group = select_probe_group(sdi); + if ((sr_config_list(sdi->driver, sdi, probe_group, SR_CONF_DEVICE_OPTIONS, &gvar_opts)) != SR_OK) /* Driver supports no device instance options. */ @@ -235,6 +240,21 @@ void show_dev_detail(void) printf("\n"); g_variant_unref(gvar); + } else if (srci->key == SR_CONF_LIMIT_SAMPLES) { + /* If implemented in config_list(), this denotes the + * maximum number of samples a device can send. This + * really applies only to logic analyzers, and then + * only to those that don't support compression, or + * have it turned off by default. The values returned + * are the low/high limits. */ + if (sr_config_list(sdi->driver, sdi, probe_group, srci->key, + &gvar) != SR_OK) { + continue; + } + g_variant_get(gvar, "(tt)", &low, &high); + g_variant_unref(gvar); + printf(" Maximum number of samples: %"PRIu64"\n", high); + } else if (srci->key == SR_CONF_SAMPLERATE) { /* Supported samplerates */ printf(" %s", srci->id);