]> sigrok.org Git - libsigrok.git/commitdiff
libsigrok.h: Add config keys SR_CONF_GATE_TIME and SR_CONF_FREQUENCY_COUNTER
authorDaniel Anselmi <redacted>
Sat, 12 Oct 2024 21:20:27 +0000 (23:20 +0200)
committerSoeren Apel <redacted>
Wed, 16 Oct 2024 22:35:49 +0000 (00:35 +0200)
include/libsigrok/libsigrok.h
src/hwdriver.c

index ca0ef91b7624f6e57621234b8b691327ca21cfa5..d3957edc69c422c2ba2fb3c389d2e31b05b3dfce 100644 (file)
@@ -760,6 +760,11 @@ enum sr_configkey {
         */
        SR_CONF_DELAY_GENERATOR,
 
+       /**
+        * The device can act as a frequency counter.
+        */
+       SR_CONF_FREQUENCY_COUNTER,
+
        /* Update sr_key_info_config[] (hwdriver.c) upon changes! */
 
        /*--- Driver scan options -------------------------------------------*/
@@ -1256,6 +1261,12 @@ enum sr_configkey {
         * @arg get: get measured resistance
         */
        SR_CONF_RESISTANCE,
+
+       /**
+        * Gate time.
+        */
+       SR_CONF_GATE_TIME,
+
        /* Update sr_key_info_config[] (hwdriver.c) upon changes! */
 };
 
index 06505d4c692259de89cc527817c97b6439c32222..443551272c90424a1138ec90b11ce96031fd7e1f 100644 (file)
@@ -65,6 +65,7 @@ static struct sr_key_info sr_key_info_config[] = {
        {SR_CONF_POWERMETER, SR_T_STRING, NULL, "Power meter", NULL},
        {SR_CONF_MULTIPLEXER, SR_T_STRING, NULL, "Multiplexer", NULL},
        {SR_CONF_DELAY_GENERATOR, SR_T_STRING, NULL, "Delay generator", NULL},
+       {SR_CONF_FREQUENCY_COUNTER, SR_T_STRING, NULL, "Frequency counter", NULL},
 
        /* Driver scan options */
        {SR_CONF_CONN, SR_T_STRING, "conn",
@@ -261,6 +262,9 @@ static struct sr_key_info sr_key_info_config[] = {
 
        {SR_CONF_RESISTANCE, SR_T_FLOAT, "resistance",
                "Resistance", NULL},
+
+       {SR_CONF_GATE_TIME, SR_T_RATIONAL_PERIOD, "gate_time",
+               "Gate time", NULL},
        ALL_ZERO
 };