tools:iio:generic_buffer: sign-extend and shift data
authorHartmut Knaack <knaack.h@gmx.de>
Sun, 31 May 2015 12:39:58 +0000 (14:39 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 31 May 2015 16:42:32 +0000 (17:42 +0100)
commit8e926134ef15267f65ddfc7389c8078234610295
tree866310be47f3ce9c7b2045eeafdf33d750825462
parente83a47cf6a5bdbd3d5677db13ae4df22f5e24b08
tools:iio:generic_buffer: sign-extend and shift data

Refactor process_scan() to handle signed and unsigned data, respect shifts
and the data mask for 2, 4 and 8 byte sized scan elements.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
tools/iio/generic_buffer.c