diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-04-15 11:32:42 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-04-15 11:32:42 +0200 |
commit | 080067b5ee69d9d9a7524b7eac249c158506e9bd (patch) | |
tree | 95160db09df0fee6efaffc4712132f8a5604a82d | |
parent | 055c0473f61ec61860f77e6420a0478ca43f4456 (diff) |
scd4x: implement startLowPower, remove unsupported stopLowPower
-rw-r--r-- | include/driver/scd4x.h | 1 | ||||
-rw-r--r-- | src/driver/scd4x.cc | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/driver/scd4x.h b/include/driver/scd4x.h index 19ba20d..d99c4fc 100644 --- a/include/driver/scd4x.h +++ b/include/driver/scd4x.h @@ -24,7 +24,6 @@ class SCD4x { void stop(); void startLowPower(); - void stopLowPower(); void read(); }; diff --git a/src/driver/scd4x.cc b/src/driver/scd4x.cc index c0901e8..3d52975 100644 --- a/src/driver/scd4x.cc +++ b/src/driver/scd4x.cc @@ -25,6 +25,13 @@ void SCD4x::stop() i2c.xmit(address, 2, txbuf, 0, rxbuf); } +void SCD4x::startLowPower() +{ + txbuf[0] = 0x21; + txbuf[1] = 0xac; + i2c.xmit(address, 2, txbuf, 0, rxbuf); +} + void SCD4x::read() { txbuf[0] = 0xec; |