]> sigrok.org Git - libsigrok.git/blobdiff - output/output_vcd.c
sr_exit(): Return int to be able to report errors.
[libsigrok.git] / output / output_vcd.c
index 61d27a10ec157a538d338b6bca834536355d6aa7..a61443dbf3b6c91a10b1dcdb788435e76628f80e 100644 (file)
@@ -106,12 +106,12 @@ static int init(struct sr_output *o)
 
        /* timescale */
        /* VCD can only handle 1/10/100 (s - fs), so scale up first */
-       if (ctx->samplerate > MHZ(1))
-               ctx->period = GHZ(1);
-       else if (ctx->samplerate > KHZ(1))
-               ctx->period = MHZ(1);
+       if (ctx->samplerate > SR_MHZ(1))
+               ctx->period = SR_GHZ(1);
+       else if (ctx->samplerate > SR_KHZ(1))
+               ctx->period = SR_MHZ(1);
        else
-               ctx->period = KHZ(1);
+               ctx->period = SR_KHZ(1);
        if (!(frequency_s = sr_period_string(ctx->period))) {
                g_string_free(ctx->header, TRUE);
                free(ctx);
@@ -165,7 +165,7 @@ static int event(struct sr_output *o, int event_type, char **data_out,
        return SR_OK;
 }
 
-static int data(struct sr_output *o, char *data_in, uint64_t length_in,
+static int data(struct sr_output *o, const char *data_in, uint64_t length_in,
                char **data_out, uint64_t *length_out)
 {
        struct context *ctx;