From: Bert Vermeulen Date: Wed, 8 Jan 2014 20:15:45 +0000 (+0100) Subject: Add config keys for programmable power supplies. X-Git-Tag: libsigrok-0.3.0~320 X-Git-Url: http://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=471607f0244e93cd67097760431a0dd3d39152eb Add config keys for programmable power supplies. --- diff --git a/hwdriver.c b/hwdriver.c index 7f820766..eb0ac3d2 100644 --- a/hwdriver.c +++ b/hwdriver.c @@ -102,6 +102,22 @@ static struct sr_config_info sr_config_info_data[] = { "Number of analog probes", NULL}, {SR_CONF_MAX_UNCOMPRESSED_SAMPLES, SR_T_UINT64, "max_uncompressed_samples", "Maximum number of uncompressed samples", NULL}, + {SR_CONF_OUTPUT_VOLTAGE, SR_T_FLOAT, "output_voltage", + "Current output voltage", NULL}, + {SR_CONF_OUTPUT_VOLTAGE_MAX, SR_T_FLOAT, "output_voltage_max", + "Maximum output voltage", NULL}, + {SR_CONF_OUTPUT_CURRENT, SR_T_FLOAT, "output_current", + "Current output current", NULL}, + {SR_CONF_OUTPUT_CURRENT_MAX, SR_T_FLOAT, "output_current_max", + "Maximum output current", NULL}, + {SR_CONF_OUTPUT_ENABLED, SR_T_BOOL, "output_enabled", + "Output enabled", NULL}, + {SR_CONF_OUTPUT_CHANNEL, SR_T_CHAR, "output_channel", + "Output channel modes", NULL}, + {SR_CONF_OVER_VOLTAGE_PROTECTION, SR_T_BOOL, "ovp", + "Over-voltage protection", NULL}, + {SR_CONF_OVER_CURRENT_PROTECTION, SR_T_BOOL, "ocp", + "Over-current protection", NULL}, {0, 0, NULL, NULL, NULL}, }; diff --git a/libsigrok.h b/libsigrok.h index 239820a1..e43338e5 100644 --- a/libsigrok.h +++ b/libsigrok.h @@ -683,6 +683,9 @@ enum { /** The device can demodulate signals. */ SR_CONF_DEMODULATOR, + /** Programmable power supply. */ + SR_CONF_POWER_SUPPLY, + /*--- Driver scan options -------------------------------------------*/ /** @@ -807,6 +810,30 @@ enum { /** The device supports setting the number of analog probes. */ SR_CONF_NUM_ANALOG_PROBES, + /** Output voltage. */ + SR_CONF_OUTPUT_VOLTAGE, + + /** Maximum output voltage. */ + SR_CONF_OUTPUT_VOLTAGE_MAX, + + /** Output current. */ + SR_CONF_OUTPUT_CURRENT, + + /** Maximum output current. */ + SR_CONF_OUTPUT_CURRENT_MAX, + + /** Enabling/disabling output. */ + SR_CONF_OUTPUT_ENABLED, + + /** Channel output configuration. */ + SR_CONF_OUTPUT_CHANNEL, + + /** Over-voltage protection (OVP) */ + SR_CONF_OVER_VOLTAGE_PROTECTION, + + /** Over-current protection (OCP) */ + SR_CONF_OVER_CURRENT_PROTECTION, + /*--- Special stuff -------------------------------------------------*/ /** Scan options supported by the driver. */