Add new configuration option allowing to remotely power-off/on
measured devices by cutting the power at probe level.

Signed-off-by: Bartosz Golaszewski <bgolaszew...@baylibre.com>
---
 include/libsigrok/libsigrok.h | 9 +++++++++
 src/hwdriver.c                | 2 ++
 2 files changed, 11 insertions(+)

diff --git a/include/libsigrok/libsigrok.h b/include/libsigrok/libsigrok.h
index 4eef903..25ef5af 100644
--- a/include/libsigrok/libsigrok.h
+++ b/include/libsigrok/libsigrok.h
@@ -913,6 +913,15 @@ enum sr_configkey {
         */
        SR_CONF_SHUNT_RESISTANCE,
 
+       /**
+        * The device supports remote power-off/on of measured devices by
+        * cutting the power supply at probe level.
+        *
+        * It's a key-value option, where key is the name/number of the probe
+        * and value should signify the desired power state.
+        */
+       SR_CONF_PROBE_POWER,
+
        /*--- Acquisition modes, sample limiting ----------------------------*/
 
        /**
diff --git a/src/hwdriver.c b/src/hwdriver.c
index 1848a08..734d695 100644
--- a/src/hwdriver.c
+++ b/src/hwdriver.c
@@ -185,6 +185,8 @@ static struct sr_config_info sr_config_info_data[] = {
                "Data source", NULL},
        {SR_CONF_SHUNT_RESISTANCE, SR_T_KEYVALUE, "shunt",
                "Shunt resistance", NULL},
+       {SR_CONF_PROBE_POWER, SR_T_KEYVALUE, "probe_power",
+               "Probe power", NULL},
 
        /* Acquisition modes, sample limiting */
        {SR_CONF_LIMIT_MSEC, SR_T_UINT64, "limit_time",
-- 
2.1.4


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to