From e3db2c4ca8fe25c590ed201a13a39dd81f41a5d6 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 2 Jan 2022 09:25:47 +0100 Subject: bme680-bsec-logger: retry i2c setup --- src/app/bme680-max44009-logger/main.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/app/bme680-max44009-logger/main.cc') 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; -- cgit v1.2.3