diff --git a/epicardium/modules/bme680.c b/epicardium/modules/bme680.c index fb03365631a48f16bc59943791bf0c17f3ccd1c1..115141b29b4796d51dd5698421cf7efdd044d0db 100644 --- a/epicardium/modules/bme680.c +++ b/epicardium/modules/bme680.c @@ -127,6 +127,13 @@ int epic_bme680_init() int epic_bme680_deinit() { + /* This is an intentional NO OP to keep the BME680 always initialized. + * + * If it configured to foreced mode, there is no energy consumption + * penalty. + */ + +#if 0 if (!initialized) { return 0; } @@ -137,6 +144,7 @@ int epic_bme680_deinit() } initialized = false; +#endif return 0; } diff --git a/epicardium/modules/hardware.c b/epicardium/modules/hardware.c index a05c65f38af808b714de9158a71536c77452d482..fb413958ee0e090251e423e3661426c6fe3dfa85 100644 --- a/epicardium/modules/hardware.c +++ b/epicardium/modules/hardware.c @@ -194,6 +194,11 @@ int hardware_early_init(void) max86150_shut_down(); + /* + * BME680 Sensor + */ + epic_bme680_init(); + /* Allow user space to trigger interrupts. * Used for BLE, not sure if needed. */ SCB->CCR |= SCB_CCR_USERSETMPEND_Msk; @@ -276,11 +281,6 @@ int hardware_reset(void) */ epic_bhi160_disable_all_sensors(); - /* - * BME680 Sensor - */ - epic_bme680_deinit(); - epic_max30001_disable_sensor(); epic_max86150_disable_sensor();