Private
Public Access
2
0

aio.c: fix ordering of comparison operator

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2014-07-28 14:56:20 +02:00
parent ad4c42ee93
commit 0ed1508315

View File

@@ -137,7 +137,7 @@ uint16_t mraa_aio_read(mraa_aio_context dev)
}
/* Adjust the raw analog input reading to supported resolution value*/
if (raw_bits =! sup_bits) {
if (raw_bits != sup_bits) {
if (raw_bits > sup_bits) {
shifter_value = raw_bits - sup_bits;
analog_value = analog_value >> shifter_value;