X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Finput%2Fbinary.c;h=e693f581f78872b99502d3e3374039b38d6587a5;hb=b75dc14a9410f57b3f7853854da013af86fb87c2;hp=51b9f6bfc4c2fbcff0487e257f0a9a0164ac3b60;hpb=3be42bc22f8b36599a448273c12a76d3e0f7a940;p=libsigrok.git diff --git a/src/input/binary.c b/src/input/binary.c index 51b9f6bf..e693f581 100644 --- a/src/input/binary.c +++ b/src/input/binary.c @@ -142,6 +142,16 @@ static int end(struct sr_input *in) return ret; } +static int reset(struct sr_input *in) +{ + struct context *inc = in->priv; + + inc->started = FALSE; + g_string_truncate(in->buf, 0); + + return SR_OK; +} + static struct sr_option options[] = { { "numchannels", "Number of channels", "Number of channels", NULL, NULL }, { "samplerate", "Sample rate", "Sample rate", NULL, NULL }, @@ -167,4 +177,5 @@ SR_PRIV struct sr_input_module input_binary = { .init = init, .receive = receive, .end = end, + .reset = reset, };