summaryrefslogtreecommitdiff
path: root/include/driver
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-10-25 15:39:28 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2019-10-25 15:39:28 +0200
commit7047bcec472ae06ccb11849fb9538c687743ec9d (patch)
treeb160f3d3f5cd1ff00b18b410e5db1de13889d6bb /include/driver
parenta4cad3173fc49cc0286f6eedf6efbca15db6688e (diff)
BME280: Add DFA model
Diffstat (limited to 'include/driver')
-rw-r--r--include/driver/bme280.h17
1 files changed, 17 insertions, 0 deletions
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);
}
};