From 49c685fadc172a731c53a869792b7f34bafbf5b1 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Thu, 30 Nov 2023 17:47:57 +0100 Subject: [PATCH] channel: Fix iio_channel_read() 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 --- channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channel.c b/channel.c index 233a1f717..beab03cac 100644 --- a/channel.c +++ b/channel.c @@ -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;