simple MCP4XXX digital potentiometer library
datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/22060b.pdf
Diff: MCP4XXX.h
- Revision:
- 2:314126c6d325
- Parent:
- 1:d0bc73e899a3
diff -r d0bc73e899a3 -r 314126c6d325 MCP4XXX.h --- a/MCP4XXX.h Wed Nov 27 07:13:25 2013 +0000 +++ b/MCP4XXX.h Wed Nov 27 18:26:07 2013 +0000 @@ -11,7 +11,7 @@ public: MCP4XXX(PinName miso, PinName mosi, PinName clk, PinName cs); ~MCP4XXX(); - void setLevel(unsigned char lvl, bool isP0); // MCP42XX is a dual pot IC + void setLevel(unsigned char lvl, bool isP0 = true); // MCP42XX is a dual pot IC unsigned char getLevel(); private: SPI *_spi;