X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=input%2Finput_binary.c;h=be67f2d2d33767e8f9b59f5ee7356d38197193b0;hb=8225e92175c64909eddaecf8bd512049acf653a2;hp=1da4e7014d3896380e14f212d46965eaf73ea2a1;hpb=5a2326a71b3a7d3bc6b367a7a3dfa6f137f5f0ec;p=libsigrok.git diff --git a/input/input_binary.c b/input/input_binary.c index 1da4e701..be67f2d2 100644 --- a/input/input_binary.c +++ b/input/input_binary.c @@ -51,7 +51,7 @@ static int init(struct sr_input *in) num_probes = DEFAULT_NUM_PROBES; /* create a virtual device */ - in->vdevice = device_new(NULL, 0, num_probes); + in->vdevice = sr_device_new(NULL, 0, num_probes); return SR_OK; } @@ -78,7 +78,7 @@ static int loadfile(struct sr_input *in, const char *filename) packet.type = SR_DF_HEADER; packet.length = sizeof(struct sr_datafeed_header); packet.payload = &header; - session_bus(in->vdevice, &packet); + sr_session_bus(in->vdevice, &packet); /* chop up the input file into chunks and feed it into the session bus */ packet.type = SR_DF_LOGIC; @@ -86,14 +86,14 @@ static int loadfile(struct sr_input *in, const char *filename) packet.payload = buffer; while ((size = read(fd, buffer, CHUNKSIZE)) > 0) { packet.length = size; - session_bus(in->vdevice, &packet); + sr_session_bus(in->vdevice, &packet); } close(fd); /* end of stream */ packet.type = SR_DF_END; packet.length = 0; - session_bus(in->vdevice, &packet); + sr_session_bus(in->vdevice, &packet); return SR_OK; }