summaryrefslogtreecommitdiff
path: root/include/driver
diff options
context:
space:
mode:
Diffstat (limited to 'include/driver')
-rw-r--r--include/driver/ccs811.h20
-rw-r--r--include/driver/max44006.h21
-rw-r--r--include/driver/max44009.h19
3 files changed, 60 insertions, 0 deletions
diff --git a/include/driver/ccs811.h b/include/driver/ccs811.h
new file mode 100644
index 0000000..27d7e41
--- /dev/null
+++ b/include/driver/ccs811.h
@@ -0,0 +1,20 @@
+#ifndef CCS811_H
+#define CCS811_H
+
+class CCS811 {
+ private:
+ CCS811(const CCS811 &copy);
+ unsigned char const address;
+ unsigned char txbuf[3];
+ unsigned char rxbuf[2];
+
+ public:
+ CCS811(unsigned char const addr) : address(addr) {}
+
+ void init();
+ short check();
+};
+
+extern CCS811 ccs811;
+
+#endif
diff --git a/include/driver/max44006.h b/include/driver/max44006.h
new file mode 100644
index 0000000..e357574
--- /dev/null
+++ b/include/driver/max44006.h
@@ -0,0 +1,21 @@
+#ifndef LM75_H
+#define LM75_H
+
+class LM75 {
+ private:
+ LM75(const LM75 &copy);
+ unsigned char const address;
+ unsigned char txbuf[3];
+ unsigned char rxbuf[2];
+
+ public:
+ LM75(unsigned char const addr) : address(addr) {}
+
+ float getTemp();
+ void setOS(unsigned char os);
+ void setHyst(unsigned char hyst);
+};
+
+extern LM75 lm75;
+
+#endif
diff --git a/include/driver/max44009.h b/include/driver/max44009.h
new file mode 100644
index 0000000..6bedd3c
--- /dev/null
+++ b/include/driver/max44009.h
@@ -0,0 +1,19 @@
+#ifndef MAX44009_H
+#define MAX44009_H
+
+class MAX44009 {
+ private:
+ MAX44009(const MAX44009 &copy);
+ unsigned char const address;
+ unsigned char txbuf[2];
+ unsigned char rxbuf[2];
+
+ public:
+ MAX44009(unsigned char const addr) : address(addr) {}
+
+ float getLux();
+};
+
+extern MAX44009 max44009;
+
+#endif