sleep if not buzy (end of loop)
This commit is contained in:
@ -158,7 +158,6 @@ void* i2cHandler(void* arg) {
|
|||||||
i2cResponse = i2c_smbus_read_byte_data(i2c, 0);
|
i2cResponse = i2c_smbus_read_byte_data(i2c, 0);
|
||||||
if (i2cResponse < 0) {
|
if (i2cResponse < 0) {
|
||||||
_log("I2C read from device %s failed: %s (%d)\n", devices[i].name, strerror(errno), errno);
|
_log("I2C read from device %s failed: %s (%d)\n", devices[i].name, strerror(errno), errno);
|
||||||
usleep(100 * 1000);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user