From a929c3cf4d98ee5e17def528ab99e27335dfa539 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 11 Mar 2020 18:01:07 +0100 Subject: Add S5851A temperature sensor driver --- include/driver/s5851a.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 include/driver/s5851a.h (limited to 'include/driver') 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 ©); + 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 -- cgit v1.2.3