summaryrefslogtreecommitdiff
path: root/src/driver/lm75.cc
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-03-04 15:30:04 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-03-04 15:30:04 +0100
commit618972e944942d7c3b4dac1f7c769608ea1d897c (patch)
treea0a81a77c39ca58859cefb29852921f35c663d45 /src/driver/lm75.cc
parent8abe98e1a21457ce01a25184066dff5f640718c6 (diff)
Add LM75 DFA model
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);