]> sigrok.org Git - libsigrok.git/blobdiff - output/chronovu_la8.c
input/output modules: Adjust to GVariant-based sr_config_* functions
[libsigrok.git] / output / chronovu_la8.c
index f5da904a230f18a6819542f2419fc1391c7b8338..625d839be1b1e8a48e6b0657004eeb44b21d907a 100644 (file)
@@ -94,7 +94,7 @@ static int init(struct sr_output *o)
        struct context *ctx;
        struct sr_probe *probe;
        GSList *l;
-       uint64_t *samplerate;
+       GVariant *gvar;
 
        if (!o) {
                sr_warn("%s: o was NULL", __func__);
@@ -129,9 +129,9 @@ static int init(struct sr_output *o)
        ctx->unitsize = (ctx->num_enabled_probes + 7) / 8;
 
        if (sr_dev_has_option(o->sdi, SR_CONF_SAMPLERATE)) {
-               o->sdi->driver->config_get(SR_CONF_SAMPLERATE,
-                               (const void **)&samplerate, o->sdi);
-               ctx->samplerate = *samplerate;
+               o->sdi->driver->config_get(SR_CONF_SAMPLERATE, &gvar, o->sdi);
+               ctx->samplerate = g_variant_get_uint64(gvar);
+               g_variant_unref(gvar);
        } else
                ctx->samplerate = 0;