X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=output%2Fvcd.c;h=60ec58c3a9bd67f65623c446c67f40743a138b89;hb=3e43da1f70d48aba917026074d46ca4c91e43bf1;hp=04d7fcbbb1a60103c20f9f16b47d33a8c230f6c4;hpb=29a27196a13de2ffd9b671185e4b464b9db9b549;p=libsigrok.git diff --git a/output/vcd.c b/output/vcd.c index 04d7fcbb..60ec58c3 100644 --- a/output/vcd.c +++ b/output/vcd.c @@ -95,8 +95,8 @@ static int init(struct sr_output *o) g_string_append_printf(ctx->header, "$version %s %s $end\n", PACKAGE, PACKAGE_VERSION); - if (sr_config_get(o->sdi->driver, SR_CONF_SAMPLERATE, &gvar, - o->sdi) == SR_OK) { + if (sr_config_get(o->sdi->driver, o->sdi, NULL, SR_CONF_SAMPLERATE, + &gvar) == SR_OK) { ctx->samplerate = g_variant_get_uint64(gvar); g_variant_unref(gvar); if (!((samplerate_s = sr_samplerate_string(ctx->samplerate)))) { @@ -190,7 +190,7 @@ static int receive(struct sr_output *o, const struct sr_dev_inst *sdi, for (p = 0; p < ctx->num_enabled_probes; p++) { index = g_array_index(ctx->probeindices, int, p); curbit = (sample[p / 8] & (((uint8_t) 1) << index)) >> index; - prevbit = (ctx->prevsample[p / 8] & (((uint64_t) 1) << index)) >> index; + prevbit = (ctx->prevsample[p / 8] & (((uint8_t) 1) << index)) >> index; /* VCD only contains deltas/changes of signals. */ if (prevbit == curbit)