Re: [PATCH 1/2] tools: iio: fix mask for 32 bit sensor data

2015-07-23 Thread Hartmut Knaack
Irina Tirdea schrieb am 23.07.2015 um 19:22: > 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

[PATCH 1/2] tools: iio: fix mask for 32 bit sensor data

2015-07-23 Thread Irina Tirdea
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

Re: [PATCH 1/2] tools: iio: fix mask for 32 bit sensor data

2015-07-23 Thread Hartmut Knaack
Irina Tirdea schrieb am 23.07.2015 um 19:22: 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,

[PATCH 1/2] tools: iio: fix mask for 32 bit sensor data

2015-07-23 Thread Irina Tirdea
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