]> sigrok.org Git - libsigrok.git/blobdiff - output/ols.c
build: Portability fixes.
[libsigrok.git] / output / ols.c
index b59931624921ba0565e88d76cf82eb3d082d237c..78a41bb0b4645032eb342ef1796246d165b6da6b 100644 (file)
@@ -71,7 +71,7 @@ static GString *gen_header(const struct sr_dev_inst *sdi, struct context *ctx)
        num_enabled_channels = 0;
        for (l = sdi->channels; l; l = l->next) {
                ch = l->data;
-               if (ch->type != SR_PROBE_LOGIC)
+               if (ch->type != SR_CHANNEL_LOGIC)
                        continue;
                if (!ch->enabled)
                        continue;
@@ -88,8 +88,8 @@ static GString *gen_header(const struct sr_dev_inst *sdi, struct context *ctx)
        return s;
 }
 
-static int receive(struct sr_output *o, const struct sr_dev_inst *sdi,
-               const struct sr_datafeed_packet *packet, GString **out)
+static int receive(struct sr_output *o, const struct sr_datafeed_packet *packet,
+               GString **out)
 {
        struct context *ctx;
        const struct sr_datafeed_meta *meta;
@@ -117,7 +117,7 @@ static int receive(struct sr_output *o, const struct sr_dev_inst *sdi,
                logic = packet->payload;
                if (ctx->num_samples == 0) {
                        /* First logic packet in the feed. */
-                       *out = gen_header(sdi, ctx);
+                       *out = gen_header(o->sdi, ctx);
                } else
                        *out = g_string_sized_new(512);
                for (i = 0; i <= logic->length - logic->unitsize; i += logic->unitsize) {
@@ -151,7 +151,6 @@ static int cleanup(struct sr_output *o)
 SR_PRIV struct sr_output_format output_ols = {
        .id = "ols",
        .description = "OpenBench Logic Sniffer",
-       .df_type = SR_DF_LOGIC,
        .init = init,
        .receive = receive,
        .cleanup = cleanup