i2c.c: fix typo in mraa_i2c_read_word_data
authorBrendan Le Foll <brendan.le.foll@intel.com>
Wed, 26 Nov 2014 07:52:40 +0000 (07:52 +0000)
committerBrendan Le Foll <brendan.le.foll@intel.com>
Wed, 26 Nov 2014 07:52:40 +0000 (07:52 +0000)
Fixes #45

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
src/i2c/i2c.c

index ba3d2f9..caa8130 100644 (file)
@@ -188,7 +188,7 @@ mraa_i2c_read_word_data(mraa_i2c_context dev, uint8_t command)
         syslog(LOG_ERR, "i2c: Failed to write");
         return 0;
     }
-    return 0xFFFF & d.byte;
+    return 0xFFFF & d.word;
 }
 
 mraa_result_t