summaryrefslogtreecommitdiff
path: root/include/driver
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-03-11 18:01:07 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2020-03-11 18:01:07 +0100
commita929c3cf4d98ee5e17def528ab99e27335dfa539 (patch)
tree8e186a5227bb7d62e3b547b60c1cda489cd82b3f /include/driver
parentd90a84032348f63f8b45b718939a0e957169b8a8 (diff)
Add S5851A temperature sensor driver
Diffstat (limited to 'include/driver')
-rw-r--r--include/driver/s5851a.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/driver/s5851a.h b/include/driver/s5851a.h
new file mode 100644
index 0000000..8acdeea
--- /dev/null
+++ b/include/driver/s5851a.h
@@ -0,0 +1,19 @@
+#ifndef S5851A_H
+#define S5851A_H
+
+class S5851A {
+ private:
+ S5851A(const S5851A &copy);
+ unsigned char const address;
+ unsigned char txbuf[1];
+ unsigned char rxbuf[2];
+
+ public:
+ S5851A(unsigned char const addr) : address(addr) {}
+
+ float getTemp();
+};
+
+extern S5851A s5851a;
+
+#endif