]> sigrok.org Git - libsigrok.git/blobdiff - output/output_vcd.c
add DF_ANALOG, and an analog output module
[libsigrok.git] / output / output_vcd.c
index d8ce6ef063e9ad53eb068916d8505c9d5f8d0705..190e9e4561fa47c44baa6a788dddc6b9690572a9 100644 (file)
@@ -61,12 +61,15 @@ static int init(struct output *o)
 
        if (!(ctx = calloc(1, sizeof(struct context))))
                return SIGROK_ERR_MALLOC;
+
        o->internal = ctx;
        ctx->num_enabled_probes = 0;
+
        for (l = o->device->probes; l; l = l->next) {
                probe = l->data;
-               if (probe->enabled)
-                       ctx->probelist[ctx->num_enabled_probes++] = probe->name;
+               if (!probe->enabled)
+                       continue;
+               ctx->probelist[ctx->num_enabled_probes++] = probe->name;
        }
 
        ctx->probelist[ctx->num_enabled_probes] = 0;
@@ -214,6 +217,7 @@ static int data(struct output *o, char *data_in, uint64_t length_in,
 struct output_format output_vcd = {
        "vcd",
        "Value Change Dump (VCD)",
+       DF_LOGIC,
        init,
        data,
        event,