X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=filter.c;h=7c4fd0b5b0444478a9ee54a3066267c47b9b218b;hb=8c48f17944a224787aa430b3b3dc5f8709ccb700;hp=6b219842e5d6cc2195aa7bab265d2f78302464aa;hpb=e46b8fb154ba90ffec9c1f805399dfa819e736f9;p=libsigrok.git diff --git a/filter.c b/filter.c index 6b219842..7c4fd0b5 100644 --- a/filter.c +++ b/filter.c @@ -22,14 +22,25 @@ #include #include -/* +/** + * Remove unused probes from samples. + * * Convert sample from maximum probes -- the way the hardware driver sent * it -- to a sample taking up only as much space as required, with * unused probes removed. + * + * @param in_unitsize The unit size of the input (data_in). + * @param out_unitsize The unit size of the output (data_out). + * @param probelist Pointer to a list of integers (probe numbers). + * @param data_in The input data. + * @param length_in The input data length. + * @param data_out The output data. + * @param length_out The output data length. + * @return SR_OK upon success, SR_ERR_MALLOC upon memory allocation errors. */ -int filter_probes(int in_unitsize, int out_unitsize, int *probelist, - char *data_in, uint64_t length_in, char **data_out, - uint64_t *length_out) +int sr_filter_probes(int in_unitsize, int out_unitsize, int *probelist, + const char *data_in, uint64_t length_in, char **data_out, + uint64_t *length_out) { unsigned int in_offset, out_offset; int num_enabled_probes, out_bit, i;