]> sigrok.org Git - libsigrok.git/commitdiff
hwdriver: Add SR_CONF_OVER_CURRENT_PROTECTION_DELAY
authorMarc Schink <redacted>
Thu, 20 Apr 2023 17:21:13 +0000 (19:21 +0200)
committerGerhard Sittig <redacted>
Thu, 21 Dec 2023 20:38:39 +0000 (21:38 +0100)
This config key allows to specify the delay before the over-current
protection triggers.

Signed-off-by: Marc Schink <redacted>
include/libsigrok/libsigrok.h
src/hwdriver.c

index 58216c2cdcb525329b505a19c30938ab7f083009..6c5dea08ab0d3ca3eeaa7fe45f1761876f1da353 100644 (file)
@@ -1129,6 +1129,14 @@ enum sr_configkey {
         */
        SR_CONF_RESISTANCE_TARGET,
 
+       /**
+        * Over-current protection (OCP) delay
+        * @arg type: double (time)
+        * @arg get: get current delay
+        * @arg set: set new delay
+        */
+       SR_CONF_OVER_CURRENT_PROTECTION_DELAY,
+
        /* Update sr_key_info_config[] (hwdriver.c) upon changes! */
 
        /*--- Special stuff -------------------------------------------------*/
index 7b497e078608ce9e2ee1e9d422152dadd6fd7779..068a215ac5f6956a4968e46566d2c3e7ce11b9d7 100644 (file)
@@ -214,6 +214,8 @@ static struct sr_key_info sr_key_info_config[] = {
                "Power Target", NULL},
        {SR_CONF_RESISTANCE_TARGET, SR_T_FLOAT, "resistance_target",
                "Resistance Target", NULL},
+       {SR_CONF_OVER_CURRENT_PROTECTION_DELAY, SR_T_FLOAT, "ocp_delay",
+               "Over-current protection delay", NULL},
 
        /* Special stuff */
        {SR_CONF_SESSIONFILE, SR_T_STRING, "sessionfile",