From: Bert Vermeulen Date: Tue, 15 May 2012 20:40:23 +0000 (+0200) Subject: cli: support for SR_HWCAP_FILTER and SR_DI_FILTERS X-Git-Tag: sigrok-cli-0.4.0~113 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=2850fca1635d42f630afa7429ae0da8f26ec516b;p=sigrok-cli.git cli: support for SR_HWCAP_FILTER and SR_DI_FILTERS --- diff --git a/sigrok-cli.c b/sigrok-cli.c index 5e54f7b..536ecce 100644 --- a/sigrok-cli.c +++ b/sigrok-cli.c @@ -320,6 +320,18 @@ static void show_dev_detail(void) for (i = 0; stropts[i]; i++) printf(" %s\n", stropts[i]); + } else if (hwo->hwcap == SR_HWCAP_FILTER) { + /* Supported trigger sources */ + printf(" %s", hwo->shortname); + if (sr_dev_info_get(dev, SR_DI_FILTERS, + (const void **)&stropts) != SR_OK) { + printf("\n"); + continue; + } + printf(" - supported filter targets:\n"); + for (i = 0; stropts[i]; i++) + printf(" %s\n", stropts[i]); + } else { /* Everything else */ printf(" %s\n", hwo->shortname);