mirror of
https://xff.cz/git/pinephone-keyboard/
synced 2024-11-09 14:05:43 +01:00
Don't exit the debugger on I2C communication errors, just report them
This commit is contained in:
parent
5e365d71d1
commit
91163251e6
1 changed files with 6 additions and 1 deletions
|
@ -36,7 +36,12 @@ void dump_log(int fd)
|
||||||
};
|
};
|
||||||
|
|
||||||
ret = ioctl(fd, I2C_RDWR, &msg);
|
ret = ioctl(fd, I2C_RDWR, &msg);
|
||||||
syscall_error(ret < 0, "I2C_RDWR failed");
|
if (ret < 0) {
|
||||||
|
printf("ERROR: (%"PRIu64") I2C_RDWR failed (%d)\n", time_abs(), errno);
|
||||||
|
fflush(stdout);
|
||||||
|
usleep(50000);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < sizeof(buf) && buf[i]; i++);
|
for (i = 0; i < sizeof(buf) && buf[i]; i++);
|
||||||
|
|
Loading…
Reference in a new issue