From: Bert Vermeulen Date: Thu, 17 May 2012 01:17:28 +0000 (+0200) Subject: cli: support for SR_HWCAP_COUPLING X-Git-Tag: sigrok-cli-0.4.0~110 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=498f9167faca80af9cc813979ea87b12b5bb9c87;p=sigrok-cli.git cli: support for SR_HWCAP_COUPLING --- diff --git a/sigrok-cli.c b/sigrok-cli.c index 0fa343d..a9f1528 100644 --- a/sigrok-cli.c +++ b/sigrok-cli.c @@ -344,6 +344,18 @@ static void show_dev_detail(void) for (i = 0; rationals[i].p && rationals[i].q; i++) printf(" %s\n", sr_voltage_string( &rationals[i])); + } else if (hwo->hwcap == SR_HWCAP_COUPLING) { + /* Supported coupling settings */ + printf(" %s", hwo->shortname); + if (sr_dev_info_get(dev, SR_DI_COUPLING, + (const void **)&stropts) != SR_OK) { + printf("\n"); + continue; + } + printf(" - supported coupling options:\n"); + for (i = 0; stropts[i]; i++) + printf(" %s\n", stropts[i]); + } else { /* Everything else */ printf(" %s\n", hwo->shortname);