summaryrefslogtreecommitdiffstats
path: root/linz/oekofen_thermo/src/MCP42010.h
blob: 9d06e7d630edb7539b8b0b4c7f3fe6577d978330 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef MCP42010_h
#define MCP42010_h

#include <Arduino.h>
#include <SPI.h>

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