linux/tools/iio
Irina Tirdea ae067cb68d tools: iio: fix mask for 32 bit sensor data
When the the sensor data uses 32 bits out of 32, generic_buffer prints
the value 0 for all data read.

In this case, the mask is shifted 32 bits, which is beyond the size of
an integer. This will lead to the mask always being 0. Before printing,
the mask is applied to the raw value, thus generating a final value of 0.

Fix the mask by shifting a 64 bit value instead of an integer.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-08-02 18:38:22 +01:00
..
generic_buffer.c tools: iio: Send error messages to stderr 2015-07-20 18:41:24 +01:00
iio_event_monitor.c tools: iio: Send error messages to stderr 2015-07-20 18:41:24 +01:00
iio_utils.c tools: iio: fix mask for 32 bit sensor data 2015-08-02 18:38:22 +01:00
iio_utils.h tools: iio: Add ARRAY_SIZE macro 2015-07-20 18:41:23 +01:00
lsiio.c tools: iio: Send error messages to stderr 2015-07-20 18:41:24 +01:00
Makefile iio: make tools more cross-compilation friendly 2015-05-10 20:31:45 +01:00