From 41fb1b9e2a292e7ace582ea834a6241542b68a9b Mon Sep 17 00:00:00 2001 From: Gordon Henderson Date: Mon, 20 May 2013 22:23:14 +0100 Subject: [PATCH] Gah. another small fix to the I2C code. --- gpio/gpio.c | 2 +- wiringPi/wiringPiI2C.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gpio/gpio.c b/gpio/gpio.c index 5044997..871548e 100644 --- a/gpio/gpio.c +++ b/gpio/gpio.c @@ -48,7 +48,7 @@ extern int wiringPiDebug ; # define FALSE (1==2) #endif -#define VERSION "2.04" +#define VERSION "2.05" #define I2CDETECT "/usr/sbin/i2cdetect" static int wpMode ; diff --git a/wiringPi/wiringPiI2C.c b/wiringPi/wiringPiI2C.c index 9e9ccf1..c787bce 100644 --- a/wiringPi/wiringPiI2C.c +++ b/wiringPi/wiringPiI2C.c @@ -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 ; }