]> sigrok.org Git - libsigrok.git/commitdiff
Add config key for amplitude.
authorBert Vermeulen <redacted>
Sun, 27 Jul 2014 21:59:49 +0000 (23:59 +0200)
committerBert Vermeulen <redacted>
Mon, 28 Jul 2014 13:40:19 +0000 (15:40 +0200)
This is intended for setting (or getting) the amplitude of a source
which doesn't really have an MQ associated with it, such as the demo
driver's analog channels.

include/libsigrok/libsigrok.h
src/hwdriver.c

index 8292483a67f1e45bf62a22e0dff2cc5f8c16cc06..03eedc61bf39f50ff189fbeaa2a7d02732833c7e 100644 (file)
@@ -756,6 +756,9 @@ enum sr_configkey {
        /** Choice of clock edge for external clock ("r" or "f"). */
        SR_CONF_CLOCK_EDGE,
 
+       /** Amplitude of a source without strictly-defined MQ. */
+       SR_CONF_AMPLITUDE,
+
        /*--- Special stuff -------------------------------------------------*/
 
        /** Scan options supported by the driver. */
index 04d877aeab2ed91db7493df6921ebd37c5f973c1..914fc337cf79e3474b42d7d851e4e18660e00c7e 100644 (file)
@@ -124,6 +124,8 @@ static struct sr_config_info sr_config_info_data[] = {
                "Sample limit", NULL},
        {SR_CONF_CLOCK_EDGE, SR_T_STRING, "clock_edge",
                "Clock edge", NULL},
+       {SR_CONF_AMPLITUDE, SR_T_FLOAT, "amplitude",
+               "Amplitude", NULL},
        {0, 0, NULL, NULL, NULL},
 };