X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Finput%2Fnull.c;fp=src%2Finput%2Fnull.c;h=031b553cc89f520e5b3db8cae5b3f18b7308ce25;hb=8cd15dd4ce2fdbefbcc6e64632c8006e5404f253;hp=0000000000000000000000000000000000000000;hpb=1aba65727015e298f213c851dbc8d2d57d27d37b;p=libsigrok.git diff --git a/src/input/null.c b/src/input/null.c new file mode 100644 index 00000000..031b553c --- /dev/null +++ b/src/input/null.c @@ -0,0 +1,59 @@ +/* + * This file is part of the libsigrok project. + * + * Copyright (C) 2018 Uwe Hermann + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include +#include +#include "libsigrok-internal.h" + +#define LOG_PREFIX "input/null" + +static int init(struct sr_input *in, GHashTable *options) +{ + (void)in; + (void)options; + + return SR_OK; +} + +static int receive(struct sr_input *in, GString *buf) +{ + (void)in; + (void)buf; + + return SR_OK; +} + +static int end(struct sr_input *in) +{ + (void)in; + + return SR_OK; +} + +SR_PRIV struct sr_input_module input_null = { + .id = "null", + .name = "Null", + .desc = "Null input (discards all input)", + .exts = NULL, + .options = NULL, + .init = init, + .receive = receive, + .end = end, + .reset = NULL, +};