Skip to content

Commit

Permalink
channel: Fix iio_channel_read()
Browse files Browse the repository at this point in the history
It was using iio_channel_convert_inverse() instead of
iio_channel_convert() to convert the raw samples into readable samples.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
  • Loading branch information
pcercuei authored and tfcollins committed Nov 30, 2023
1 parent f5b7f6a commit 81580d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ size_t iio_channel_read(const struct iio_channel *chn,
if (raw)
cb = chn_memcpy;
else
cb = iio_channel_convert_inverse;
cb = iio_channel_convert;

for (src_ptr = (uintptr_t) iio_block_first(block, chn);
src_ptr < block_end && dst_ptr + length <= end;
Expand Down

0 comments on commit 81580d6

Please sign in to comment.