]> sigrok.org Git - sigrok-cli.git/commitdiff
cli: support for SR_HWCAP_COUPLING
authorBert Vermeulen <redacted>
Thu, 17 May 2012 01:17:28 +0000 (03:17 +0200)
committerBert Vermeulen <redacted>
Wed, 30 May 2012 21:56:13 +0000 (23:56 +0200)
sigrok-cli.c

index 0fa343d6fd3b480ae8e5c85821314ce3631eabe5..a9f15285e8faa64028904924fb8da6176801bc7d 100644 (file)
@@ -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);