summaryrefslogtreecommitdiff
path: root/src/app/i2cdetect
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-12-25 13:02:52 +0100
committerDaniel Friesel <derf@finalrewind.org>2021-12-25 13:02:52 +0100
commitd23e540ea2868cf9a511dad8eba105496542140e (patch)
tree7bdcabd62f337c1b1b5b5e1fe5f744b49f1990a3 /src/app/i2cdetect
parent9bb31304e8e2bdcf905487ece717991547af1b94 (diff)
i2cdetect: retry i2c setup if it fails
Diffstat (limited to 'src/app/i2cdetect')
-rw-r--r--src/app/i2cdetect/main.cc4
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;