aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2017-03-02 14:38:19 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2017-03-02 15:18:02 +0100
commit0d9841ddd6ef917258d95a50d753d80a23fabb90 (patch)
tree92453dcf1ed848dcbe300e61db731bcb74b07d45
parent6928c4a9289368573f44b683a464bf6b8dcc71d7 (diff)
rohde-schwarz-sme-0x: Add support for SR_CONF_SIGNAL_GENERATOR.
-rw-r--r--src/hardware/rohde-schwarz-sme-0x/api.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/hardware/rohde-schwarz-sme-0x/api.c b/src/hardware/rohde-schwarz-sme-0x/api.c
index 58a636d..6b84c64 100644
--- a/src/hardware/rohde-schwarz-sme-0x/api.c
+++ b/src/hardware/rohde-schwarz-sme-0x/api.c
@@ -71,6 +71,10 @@ static const uint32_t scanopts[] = {
SR_CONF_SERIALCOMM,
};
+static const uint32_t drvopts[] = {
+ SR_CONF_SIGNAL_GENERATOR,
+};
+
static const uint32_t devopts[] = {
SR_CONF_OUTPUT_FREQUENCY | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
SR_CONF_AMPLITUDE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
@@ -240,6 +244,13 @@ static int config_list(uint32_t key, GVariant **data,
(void)sdi;
(void)cg;
+ /* Return drvopts without sdi (and devopts with sdi, see below). */
+ if (key == SR_CONF_DEVICE_OPTIONS && !sdi) {
+ *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
+ drvopts, ARRAY_SIZE(drvopts), sizeof(uint32_t));
+ return SR_OK;
+ }
+
switch (key) {
case SR_CONF_SCAN_OPTIONS:
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,