mirror of
https://github.com/clockworkpi/WiringPi.git
synced 2025-12-14 00:28:52 +01:00
Gah. another small fix to the I2C code.
This commit is contained in:
parent
a7c21d3efc
commit
41fb1b9e2a
@ -48,7 +48,7 @@ extern int wiringPiDebug ;
|
|||||||
# define FALSE (1==2)
|
# define FALSE (1==2)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define VERSION "2.04"
|
#define VERSION "2.05"
|
||||||
#define I2CDETECT "/usr/sbin/i2cdetect"
|
#define I2CDETECT "/usr/sbin/i2cdetect"
|
||||||
|
|
||||||
static int wpMode ;
|
static int wpMode ;
|
||||||
|
|||||||
@ -150,7 +150,7 @@ int wiringPiI2CReadReg16 (int fd, int reg)
|
|||||||
if (i2c_smbus_access (fd, I2C_SMBUS_READ, reg, I2C_SMBUS_WORD_DATA, &data))
|
if (i2c_smbus_access (fd, I2C_SMBUS_READ, reg, I2C_SMBUS_WORD_DATA, &data))
|
||||||
return -1 ;
|
return -1 ;
|
||||||
else
|
else
|
||||||
return data.byte & 0xFFFF ;
|
return data.word & 0xFFFF ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user