diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-12-25 13:02:52 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-12-25 13:02:52 +0100 |
commit | d23e540ea2868cf9a511dad8eba105496542140e (patch) | |
tree | 7bdcabd62f337c1b1b5b5e1fe5f744b49f1990a3 /src/app/i2cdetect | |
parent | 9bb31304e8e2bdcf905487ece717991547af1b94 (diff) |
i2cdetect: retry i2c setup if it fails
Diffstat (limited to 'src/app/i2cdetect')
-rw-r--r-- | src/app/i2cdetect/main.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/app/i2cdetect/main.cc b/src/app/i2cdetect/main.cc index 18800e5..b072347 100644 --- a/src/app/i2cdetect/main.cc +++ b/src/app/i2cdetect/main.cc @@ -21,9 +21,9 @@ int main(void) gpio.setup(); kout.setup(); - if (i2c.setup() != 0) { + while (i2c.setup() != 0) { kout << "I2C setup FAILED" << endl; - return 1; + arch.delay_ms(1000); } kout << "I2C setup OK" << endl; |