From: Bert Vermeulen Date: Wed, 16 May 2012 23:55:59 +0000 (+0200) Subject: sr: support for SR_HWCAP_VDIV and SR_DI_VDIVS X-Git-Tag: dsupstream~940 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=bd8db307da41b3ca0f5401015f92e833e1db658e;p=libsigrok.git sr: support for SR_HWCAP_VDIV and SR_DI_VDIVS --- diff --git a/hwdriver.c b/hwdriver.c index 11039016..7ec0dd0e 100644 --- a/hwdriver.c +++ b/hwdriver.c @@ -43,6 +43,7 @@ SR_API struct sr_hwcap_option sr_hwcap_options[] = { {SR_HWCAP_BUFFERSIZE, SR_T_UINT64, "Buffer size", "buffersize"}, {SR_HWCAP_TIMEBASE, SR_T_RATIONAL_PERIOD, "Time base", "timebase"}, {SR_HWCAP_FILTER, SR_T_CHAR, "Filter targets", "filter"}, + {SR_HWCAP_VDIV, SR_T_RATIONAL_VOLT, "Volts/div", "vdiv"}, {0, 0, NULL, NULL}, }; diff --git a/sigrok.h.in b/sigrok.h.in index 8ff1b092..38d7d474 100644 --- a/sigrok.h.in +++ b/sigrok.h.in @@ -144,6 +144,7 @@ enum { SR_T_BOOL, SR_T_FLOAT, SR_T_RATIONAL_PERIOD, + SR_T_RATIONAL_VOLT, }; struct sr_rational { @@ -319,6 +320,9 @@ enum { /** Filter. */ SR_HWCAP_FILTER, + /** Volts/div. */ + SR_HWCAP_VDIV, + /*--- Special stuff -------------------------------------------------*/ /* TODO: Better description. */ @@ -427,6 +431,8 @@ enum { SR_DI_TRIGGER_SOURCES, /* Supported filter targets */ SR_DI_FILTERS, + /* Valid volts/div values */ + SR_DI_VDIVS, }; /*