chiark / gitweb /
Gah. another small fix to the I2C code.
[wiringPi.git] / wiringPi / wiringPiI2C.c
index 9e9ccf16230ed2061ba68908479deb3637400cde..c787bcea27d2f24f848c4e841aa3eae22f79e074 100644 (file)
@@ -150,7 +150,7 @@ int wiringPiI2CReadReg16 (int fd, int reg)
   if (i2c_smbus_access (fd, I2C_SMBUS_READ, reg, I2C_SMBUS_WORD_DATA, &data))
     return -1 ;
   else
-    return data.byte & 0xFFFF ;
+    return data.word & 0xFFFF ;
 }