X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Finput%2Finput.c;h=b5de532bc58a1c25a4d3430d223a8b5b8ee7299b;hb=d65f51bf5c549e5dbacb5c6fb6636e482ff02da8;hp=4d3eb9856744271879f2f93fc866c7ddbad6c07b;hpb=a38c2bfbbb622b79932cc751744d3265aa385f9b;p=libsigrok.git diff --git a/src/input/input.c b/src/input/input.c index 4d3eb985..b5de532b 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -29,7 +29,9 @@ #define LOG_PREFIX "input" /** @endcond */ +/** @cond PRIVATE */ #define CHUNK_SIZE (4 * 1024 * 1024) +/** @endcond */ /** * @file @@ -64,23 +66,29 @@ extern SR_PRIV struct sr_input_module input_chronovu_la8; extern SR_PRIV struct sr_input_module input_csv; extern SR_PRIV struct sr_input_module input_binary; +extern SR_PRIV struct sr_input_module input_stf; extern SR_PRIV struct sr_input_module input_trace32_ad; extern SR_PRIV struct sr_input_module input_vcd; extern SR_PRIV struct sr_input_module input_wav; extern SR_PRIV struct sr_input_module input_raw_analog; extern SR_PRIV struct sr_input_module input_logicport; +extern SR_PRIV struct sr_input_module input_saleae; extern SR_PRIV struct sr_input_module input_null; -/* @endcond */ +/** @endcond */ static const struct sr_input_module *input_module_list[] = { &input_binary, &input_chronovu_la8, &input_csv, +#if defined HAVE_INPUT_STF && HAVE_INPUT_STF + &input_stf, +#endif &input_trace32_ad, &input_vcd, &input_wav, &input_raw_analog, &input_logicport, + &input_saleae, &input_null, NULL, }; @@ -582,8 +590,10 @@ SR_API struct sr_dev_inst *sr_input_dev_inst_get(const struct sr_input *in) */ SR_API int sr_input_send(const struct sr_input *in, GString *buf) { - sr_spew("Sending %" G_GSIZE_FORMAT " bytes to %s module.", - buf->len, in->module->id); + size_t len; + + len = buf ? buf->len : 0; + sr_spew("Sending %zu bytes to %s module.", len, in->module->id); return in->module->receive((struct sr_input *)in, buf); }