new config options: averaging

Add new config options to libsigrok - 'averaging', which allows to
enable averaging of samples and 'avg_samples' for setting the number
of samples to be averaged over in each cycle.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
This commit is contained in:
Bartosz Golaszewski 2015-01-22 10:22:58 +01:00 committed by Uwe Hermann
parent d5062672dd
commit 9ed444e622
2 changed files with 13 additions and 0 deletions

View File

@ -665,6 +665,15 @@ enum sr_configkey {
/** The device supports setting trigger slope. */
SR_CONF_TRIGGER_SLOPE,
/** The device supports averaging. */
SR_CONF_AVERAGING,
/**
* The device supports setting number of samples to be
* averaged over.
*/
SR_CONF_AVG_SAMPLES,
/** Trigger source. */
SR_CONF_TRIGGER_SOURCE,

View File

@ -79,6 +79,10 @@ static struct sr_config_info sr_config_info_data[] = {
"Run length encoding", NULL},
{SR_CONF_TRIGGER_SLOPE, SR_T_STRING, "triggerslope",
"Trigger slope", NULL},
{SR_CONF_AVERAGING, SR_T_BOOL, "averaging",
"Averaging", NULL},
{SR_CONF_AVG_SAMPLES, SR_T_UINT64, "avg_samples",
"Number of samples to average over", NULL},
{SR_CONF_TRIGGER_SOURCE, SR_T_STRING, "triggersource",
"Trigger source", NULL},
{SR_CONF_HORIZ_TRIGGERPOS, SR_T_FLOAT, "horiz_triggerpos",