summaryrefslogtreecommitdiff
path: root/src/app/bme680-max44009-logger
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-01-02 09:25:47 +0100
committerDaniel Friesel <derf@finalrewind.org>2022-01-02 09:25:47 +0100
commite3db2c4ca8fe25c590ed201a13a39dd81f41a5d6 (patch)
tree806358575920545a5c478ef0ce668e53a72eede5 /src/app/bme680-max44009-logger
parent4e89a03bc4e8e3b17490bdd39de47ae843fa4d0d (diff)
bme680-bsec-logger: retry i2c setup
Diffstat (limited to 'src/app/bme680-max44009-logger')
-rw-r--r--src/app/bme680-max44009-logger/main.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/app/bme680-max44009-logger/main.cc b/src/app/bme680-max44009-logger/main.cc
index 3634d30..8a3ce3a 100644
--- a/src/app/bme680-max44009-logger/main.cc
+++ b/src/app/bme680-max44009-logger/main.cc
@@ -139,9 +139,9 @@ int main(void)
ADCSRA = _BV(ADEN) | _BV(ADATE) | _BV(ADPS2) | _BV(ADPS1);
#endif
- if (i2c.setup() != 0) {
+ while (i2c.setup() != 0) {
kout << "# I2C setup failed" << endl;
- return 1;
+ arch.delay_ms(100);
}
kout << "# I2C setup OK" << endl;