+
+ } else if (hwo->hwcap == SR_HWCAP_BUFFERSIZE) {
+ /* Supported buffer sizes */
+ printf(" %s", hwo->shortname);
+ if (sr_info_get(sdi->driver, SR_DI_BUFFERSIZES,
+ (const void **)&integers, sdi) != SR_OK) {
+ printf("\n");
+ continue;
+ }
+ printf(" - supported buffer sizes:\n");
+ for (i = 0; integers[i]; i++)
+ printf(" %"PRIu64"\n", integers[i]);
+
+ } else if (hwo->hwcap == SR_HWCAP_TIMEBASE) {
+ /* Supported time bases */
+ printf(" %s", hwo->shortname);
+ if (sr_info_get(sdi->driver, SR_DI_TIMEBASES,
+ (const void **)&rationals, sdi) != SR_OK) {
+ printf("\n");
+ continue;
+ }
+ printf(" - supported time bases:\n");
+ for (i = 0; rationals[i].p && rationals[i].q; i++)
+ printf(" %s\n", sr_period_string(
+ rationals[i].p * rationals[i].q));
+
+ } else if (hwo->hwcap == SR_HWCAP_TRIGGER_SOURCE) {
+ /* Supported trigger sources */
+ printf(" %s", hwo->shortname);
+ if (sr_info_get(sdi->driver, SR_DI_TRIGGER_SOURCES,
+ (const void **)&stropts, sdi) != SR_OK) {
+ printf("\n");
+ continue;
+ }
+ printf(" - supported trigger sources:\n");
+ 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_info_get(sdi->driver, SR_DI_FILTERS,
+ (const void **)&stropts, sdi) != SR_OK) {
+ printf("\n");
+ continue;
+ }
+ printf(" - supported filter targets:\n");
+ for (i = 0; stropts[i]; i++)
+ printf(" %s\n", stropts[i]);
+
+ } else if (hwo->hwcap == SR_HWCAP_VDIV) {
+ /* Supported volts/div values */
+ printf(" %s", hwo->shortname);
+ if (sr_info_get(sdi->driver, SR_DI_VDIVS,
+ (const void **)&rationals, sdi) != SR_OK) {
+ printf("\n");
+ continue;
+ }
+ printf(" - supported volts/div:\n");
+ 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_info_get(sdi->driver, SR_DI_COUPLING,
+ (const void **)&stropts, sdi) != SR_OK) {
+ printf("\n");
+ continue;
+ }
+ printf(" - supported coupling options:\n");
+ for (i = 0; stropts[i]; i++)
+ printf(" %s\n", stropts[i]);
+