From 63eec380738b001cf85242cc8f3b370970bd8d71 Mon Sep 17 00:00:00 2001 From: Timo Kokkonen Date: Sat, 29 Aug 2020 12:37:46 -0700 Subject: [PATCH] hwdriver: Add SR_CONF_DUTY_CYCLE & SR_CONF_PHASE. --- include/libsigrok/libsigrok.h | 6 ++++++ src/hwdriver.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/include/libsigrok/libsigrok.h b/include/libsigrok/libsigrok.h index c6ed56c5..cfff8bdf 100644 --- a/include/libsigrok/libsigrok.h +++ b/include/libsigrok/libsigrok.h @@ -1041,6 +1041,12 @@ enum sr_configkey { /** The number of digits (e.g. for a DMM). */ SR_CONF_DIGITS, + /** Phase of a source signal. */ + SR_CONF_PHASE, + + /** Duty cycle of a source signal. */ + SR_CONF_DUTY_CYCLE, + /* Update sr_key_info_config[] (hwdriver.c) upon changes! */ /*--- Special stuff -------------------------------------------------*/ diff --git a/src/hwdriver.c b/src/hwdriver.c index a24d54d5..f8d54ac8 100644 --- a/src/hwdriver.c +++ b/src/hwdriver.c @@ -201,6 +201,10 @@ static struct sr_key_info sr_key_info_config[] = { "Range", NULL}, {SR_CONF_DIGITS, SR_T_STRING, "digits", "Digits", NULL}, + {SR_CONF_PHASE, SR_T_FLOAT, "phase", + "Phase", NULL}, + {SR_CONF_DUTY_CYCLE, SR_T_FLOAT, "output_duty_cycle", + "Duty Cycle", NULL}, /* Special stuff */ {SR_CONF_SESSIONFILE, SR_T_STRING, "sessionfile",