From 0b8366c59fa0b34a70b6b453bfb0f8eaf34a2f16 Mon Sep 17 00:00:00 2001 From: manuel Date: Wed, 21 Oct 2020 15:55:29 +0200 Subject: Add Linz --- linz/oekofen_thermo/src/MCP42010.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 linz/oekofen_thermo/src/MCP42010.h (limited to 'linz/oekofen_thermo/src/MCP42010.h') diff --git a/linz/oekofen_thermo/src/MCP42010.h b/linz/oekofen_thermo/src/MCP42010.h new file mode 100644 index 0000000..9d06e7d --- /dev/null +++ b/linz/oekofen_thermo/src/MCP42010.h @@ -0,0 +1,25 @@ +#ifndef MCP42010_h +#define MCP42010_h + +#include +#include + +class MCP42010 +{ + public: + enum Poti + { + P0 = 0b01, + P1 = 0b10, + }; + + MCP42010(uint8_t ss_pin); + void setup(); + void setPot(Poti pot, uint8_t value); + + private: + uint8_t _ss_pin; + SPISettings _spiset; +}; + +#endif \ No newline at end of file -- cgit v1.2.3