]> sigrok.org Git - libsigrok.git/blobdiff - output/vcd.c
zeroplus: Add support for additional memory sizes
[libsigrok.git] / output / vcd.c
index 04d7fcbbb1a60103c20f9f16b47d33a8c230f6c4..60ec58c3a9bd67f65623c446c67f40743a138b89 100644 (file)
@@ -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)