simple MCP4XXX digital potentiometer library

datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/22060b.pdf

Files at this revision

API Documentation at this revision

Comitter:
jyam
Date:
Wed Nov 27 18:26:07 2013 +0000
Parent:
1:d0bc73e899a3
Commit message:
default isP0 to true

Changed in this revision

MCP4XXX.h Show annotated file Show diff for this revision Revisions of this file
--- 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;