X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=output%2Fvcd.c;h=44a12dec37a8c2e2265ea499d4410d61443d5ac3;hb=2b399703d10dedfbed1f6b13070e0c3f5fd9938b;hp=60ec58c3a9bd67f65623c446c67f40743a138b89;hpb=34539700795f6ef4879105818cf8ed4e7336d6c1;p=libsigrok.git diff --git a/output/vcd.c b/output/vcd.c index 60ec58c3..44a12dec 100644 --- a/output/vcd.c +++ b/output/vcd.c @@ -26,14 +26,7 @@ #include "libsigrok.h" #include "libsigrok-internal.h" -/* Message logging helpers with subsystem-specific prefix string. */ -#define LOG_PREFIX "output/vcd: " -#define sr_log(l, s, args...) sr_log(l, LOG_PREFIX s, ## args) -#define sr_spew(s, args...) sr_spew(LOG_PREFIX s, ## args) -#define sr_dbg(s, args...) sr_dbg(LOG_PREFIX s, ## args) -#define sr_info(s, args...) sr_info(LOG_PREFIX s, ## args) -#define sr_warn(s, args...) sr_warn(LOG_PREFIX s, ## args) -#define sr_err(s, args...) sr_err(LOG_PREFIX s, ## args) +#define LOG_PREFIX "output/vcd" struct context { int num_enabled_probes; @@ -69,6 +62,8 @@ static int init(struct sr_output *o) for (l = o->sdi->probes; l; l = l->next) { probe = l->data; + if (probe->type != SR_PROBE_LOGIC) + continue; if (!probe->enabled) continue; ctx->probeindices = g_array_append_val( @@ -131,6 +126,8 @@ static int init(struct sr_output *o) /* Wires / channels */ for (i = 0, l = o->sdi->probes; l; l = l->next, i++) { probe = l->data; + if (probe->type != SR_PROBE_LOGIC) + continue; if (!probe->enabled) continue; g_string_append_printf(ctx->header, "$var wire 1 %c %s $end\n",