]> sigrok.org Git - libsigrok.git/commitdiff
sr: support for SR_HWCAP_VDIV and SR_DI_VDIVS
authorBert Vermeulen <redacted>
Wed, 16 May 2012 23:55:59 +0000 (01:55 +0200)
committerBert Vermeulen <redacted>
Wed, 30 May 2012 21:56:12 +0000 (23:56 +0200)
hwdriver.c
sigrok.h.in

index 1103901612c89e914a97c80df0ec3402f39a4066..7ec0dd0efe604c4732d81f5ea5f2d92f46acfe57 100644 (file)
@@ -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},
 };
 
index 8ff1b092dbf23508affe1177cc44f9f181ad3da9..38d7d474ebcf2b4a011bcbe12a6fea940a0e5f6c 100644 (file)
@@ -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,
 };
 
 /*