]> sigrok.org Git - libsigrok.git/blobdiff - hardware/hantek-dso/api.c
brymen-dmm: Use port name instead of fd in debug message.
[libsigrok.git] / hardware / hantek-dso / api.c
index 3a342efcfe9ca511e36d0dcdbfb0508863990ad1..f74cefdf02ab54aac120f5851a7ef577cc3e2fcb 100644 (file)
@@ -422,11 +422,14 @@ static int cleanup(void)
        return dev_clear();
 }
 
-static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi)
+static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
+               const struct sr_probe_group *probe_group)
 {
        struct sr_usb_dev_inst *usb;
        char str[128];
 
+       (void)probe_group;
+
        switch (id) {
        case SR_CONF_CONN:
                if (!sdi || !sdi->conn)
@@ -452,7 +455,8 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi)
        return SR_OK;
 }
 
-static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
+static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
+               const struct sr_probe_group *probe_group)
 {
        struct dev_context *devc;
        double tmp_double;
@@ -462,6 +466,8 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
        const char *tmp_str;
        char **targets;
 
+       (void)probe_group;
+
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
 
@@ -579,17 +585,16 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
        return ret;
 }
 
-static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi)
+static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
+               const struct sr_probe_group *probe_group)
 {
        struct dev_context *devc;
        GVariant *tuple, *rational[2];
        GVariantBuilder gvb;
        unsigned int i;
 
-       if (!sdi)
-               return SR_ERR_ARG;
+       (void)probe_group;
 
-       devc = sdi->priv;
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
                *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32,
@@ -600,6 +605,9 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi)
                                devopts, ARRAY_SIZE(devopts), sizeof(int32_t));
                break;
        case SR_CONF_BUFFERSIZE:
+               if (!sdi)
+                       return SR_ERR_ARG;
+               devc = sdi->priv;
                *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT64,
                                devc->profile->buffersizes, 2, sizeof(uint64_t));
                break;