X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Finput%2Finput.c;h=f7de6c7f36a821c16b54c88b4a573c8c427e6707;hb=b28e391a755e28568b6e0a8161d55d87e0c5f3cc;hp=4d3eb9856744271879f2f93fc866c7ddbad6c07b;hpb=a38c2bfbbb622b79932cc751744d3265aa385f9b;p=libsigrok.git diff --git a/src/input/input.c b/src/input/input.c index 4d3eb985..f7de6c7f 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 @@ -69,8 +71,9 @@ 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, @@ -81,6 +84,7 @@ static const struct sr_input_module *input_module_list[] = { &input_wav, &input_raw_analog, &input_logicport, + &input_saleae, &input_null, NULL, }; @@ -582,8 +586,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); }