#include <string.h>
#include <glib.h>
#include <sigrok.h>
+#include <sigrok-internal.h>
#include "config.h"
struct context {
uint64_t samplerate;
};
-const char *vcd_header = "\
-$date %s $end\n\
-$version %s $end\n%s\
-$timescale %s $end\n\
-$scope module %s $end\n\
-%s\
-$upscope $end\n\
-$enddefinitions $end\n\
-$dumpvars\n";
-
static const char *vcd_header_comment = "\
$comment\n Acquisition with %d/%d probes at %s\n$end\n";
ctx->probelist[ctx->num_enabled_probes++] = probe->name;
}
if (ctx->num_enabled_probes > 94) {
- g_warning("VCD only supports 94 probes.");
+ sr_warn("VCD only supports 94 probes.");
return SR_ERR;
}
}
struct sr_output_format output_vcd = {
- "vcd",
- "Value Change Dump (VCD)",
- SR_DF_LOGIC,
- init,
- data,
- event,
+ .id = "vcd",
+ .description = "Value Change Dump (VCD)",
+ .df_type = SR_DF_LOGIC,
+ .init = init,
+ .data = data,
+ .event = event,
};