X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=input%2Fbinary.c;h=59c79c436fdda64f16c94fbc425969a2bbe55027;hb=c73d2ea421c2b425c3f0ae33bce2bfd0c448ca5f;hp=80820e022c7b64c736a4e4f14f4d7f42d51c0ebe;hpb=8ff6afc95d2a9213b8a583e88e9e1b4eb59aad17;p=libsigrok.git diff --git a/input/binary.c b/input/binary.c index 80820e02..59c79c43 100644 --- a/input/binary.c +++ b/input/binary.c @@ -1,7 +1,7 @@ /* * This file is part of the sigrok project. * - * Copyright (C) 2010 Bert Vermeulen + * Copyright (C) 2010-2012 Bert Vermeulen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -51,12 +51,12 @@ static int init(struct sr_input *in) } /* Create a virtual device. */ - in->vdevice = sr_device_new(NULL, 0); + in->vdevice = sr_dev_new(NULL, 0); for (i = 0; i < num_probes; i++) { snprintf(name, SR_MAX_PROBENAME_LEN, "%d", i); /* TODO: Check return value. */ - sr_device_probe_add(in->vdevice, name); + sr_dev_probe_add(in->vdevice, name); } return SR_OK; @@ -78,7 +78,6 @@ static int loadfile(struct sr_input *in, const char *filename) /* send header */ header.feed_version = 1; header.num_logic_probes = num_probes; - header.num_analog_probes = 0; header.samplerate = 0; gettimeofday(&header.starttime, NULL); packet.type = SR_DF_HEADER; @@ -103,7 +102,7 @@ static int loadfile(struct sr_input *in, const char *filename) return SR_OK; } -struct sr_input_format input_binary = { +SR_PRIV struct sr_input_format input_binary = { .id = "binary", .description = "Raw binary", .format_match = format_match,