From: Soeren Apel Date: Mon, 2 May 2016 16:02:31 +0000 (+0200) Subject: Input/chronovu_la8: Add reset() function X-Git-Tag: libsigrok-0.5.0~435 X-Git-Url: http://sigrok.org/gitweb/?a=commitdiff_plain;h=ef9d3fefbcce893a19ae1d497f586ac794e94ca2;p=libsigrok.git Input/chronovu_la8: Add reset() function --- diff --git a/src/input/chronovu_la8.c b/src/input/chronovu_la8.c index 0afd8ea2..48c04b90 100644 --- a/src/input/chronovu_la8.c +++ b/src/input/chronovu_la8.c @@ -154,6 +154,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 }, @@ -181,4 +191,5 @@ SR_PRIV struct sr_input_module input_chronovu_la8 = { .init = init, .receive = receive, .end = end, + .reset = reset, };