summaryrefslogtreecommitdiff
path: root/src/driver/lm75.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/driver/lm75.cc')
-rw-r--r--src/driver/lm75.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/driver/lm75.cc b/src/driver/lm75.cc
index 83b2dcf..2223137 100644
--- a/src/driver/lm75.cc
+++ b/src/driver/lm75.cc
@@ -49,4 +49,18 @@ void LM75::setHyst(unsigned char hyst)
i2c.xmit(address, 3, txbuf, 0, rxbuf);
}
+void LM75::init()
+{
+ txbuf[0] = 0x01;
+ txbuf[1] = 0x00;
+ i2c.xmit(address, 2, txbuf, 0, rxbuf);
+}
+
+void LM75::shutdown()
+{
+ txbuf[0] = 0x01;
+ txbuf[1] = 0x01;
+ i2c.xmit(address, 2, txbuf, 0, rxbuf);
+}
+
LM75 lm75(0x48);