diff options
-rw-r--r-- | drivers/staging/iio/Documentation/generic_buffer.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/staging/iio/Documentation/generic_buffer.c b/drivers/staging/iio/Documentation/generic_buffer.c index 827e92de8e30..40d0ecac047f 100644 --- a/drivers/staging/iio/Documentation/generic_buffer.c +++ b/drivers/staging/iio/Documentation/generic_buffer.c @@ -104,6 +104,16 @@ void process_scan(char *data, print2byte(*(uint16_t *)(data + channels[k].location), &channels[k]); break; + case 4: + if (!channels[k].is_signed) { + uint32_t val = *(uint32_t *) + (data + channels[k].location); + printf("%05f ", ((float)val + + channels[k].offset)* + channels[k].scale); + + } + break; case 8: if (channels[k].is_signed) { int64_t val = *(int64_t *) |