]> sigrok.org Git - libsigrok.git/commitdiff
manson-hcs-3xxx: Publish driver options.
authorAurelien Jacobs <redacted>
Wed, 19 Nov 2014 22:53:10 +0000 (23:53 +0100)
committerAurelien Jacobs <redacted>
Wed, 19 Nov 2014 22:53:10 +0000 (23:53 +0100)
src/hardware/manson-hcs-3xxx/api.c

index 6be41b9fd9b67460d98fffbe78c5ef20b3fcd6f5..b04ab16f9974e9bfdf629c5adaacb49f2575b29a 100644 (file)
 
 #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;