From 7047bcec472ae06ccb11849fb9538c687743ec9d Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 25 Oct 2019 15:39:28 +0200 Subject: BME280: Add DFA model --- include/driver/bme280.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'include/driver') diff --git a/include/driver/bme280.h b/include/driver/bme280.h index d07bde4..584ddee 100644 --- a/include/driver/bme280.h +++ b/include/driver/bme280.h @@ -530,22 +530,39 @@ class BME280 { inline void setHumidityOversampling(uint8_t os) { settings.osr_h = os; + setSensorSettings(BME280_OSR_HUM_SEL); } inline void setPressureOversampling(uint8_t os) { settings.osr_p = os; + setSensorSettings(BME280_OSR_PRESS_SEL); } inline void setTemperatureOversampling(uint8_t os) { settings.osr_t = os; + setSensorSettings(BME280_OSR_TEMP_SEL); } inline void setStandbyTime(uint8_t standby_time) { settings.standby_time = standby_time; + setSensorSettings(BME280_STANDBY_SEL); } inline void setFilter(uint8_t filter) { settings.filter = filter; + setSensorSettings(BME280_FILTER_SEL); + } + + inline void enterSleepMode() { + setSensorMode(BME280_SLEEP_MODE); + } + + inline void enterNormalMode() { + setSensorMode(BME280_NORMAL_MODE); + } + + inline void enterForcedMode() { + setSensorMode(BME280_FORCED_MODE); } }; -- cgit v1.2.3