HAL_Linux: cope with systems without I2C_RDRW_IOCTL_MAX_MSGS
such as my ubuntu 14.04 laptop :-)
This commit is contained in:
parent
6a8da06d19
commit
b09fcfc20e
@ -174,7 +174,11 @@ uint8_t LinuxI2CDriver::readRegistersMultiple(uint8_t addr, uint8_t reg,
|
||||
uint8_t len,
|
||||
uint8_t count, uint8_t* data)
|
||||
{
|
||||
#ifdef I2C_RDRW_IOCTL_MAX_MSGS
|
||||
const uint8_t max_count = I2C_RDRW_IOCTL_MAX_MSGS / 2;
|
||||
#else
|
||||
const uint8_t max_count = 8;
|
||||
#endif
|
||||
|
||||
if (_fd == -1) {
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user