From: Aurelien Jacobs Date: Wed, 19 Nov 2014 22:53:10 +0000 (+0100) Subject: manson-hcs-3xxx: Publish driver options. X-Git-Tag: libsigrok-0.4.0~734 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f3ba3c119c3918dfa9cbde74afe21bd4c5609b44;p=libsigrok.git manson-hcs-3xxx: Publish driver options. --- diff --git a/src/hardware/manson-hcs-3xxx/api.c b/src/hardware/manson-hcs-3xxx/api.c index 6be41b9f..b04ab16f 100644 --- a/src/hardware/manson-hcs-3xxx/api.c +++ b/src/hardware/manson-hcs-3xxx/api.c @@ -26,6 +26,11 @@ #include "protocol.h" +static const uint32_t drvopts[] = { + /* Device class */ + SR_CONF_POWER_SUPPLY, +}; + static const uint32_t scanopts[] = { SR_CONF_CONN, SR_CONF_SERIALCOMM, @@ -329,6 +334,12 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst * (void)cg; + 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; + } + if (!sdi) return SR_ERR_ARG; devc = sdi->priv;