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 ; }