lib to set the address of the MCP4728

Dependents:   MCP4728setaddrProg mbedSerialInterface_talkback2 MCP4728test mbedSerialInterface_sequencer

Revision:
0:19560a1deb3c
Child:
1:1ba04e54bd3c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MCP4728setaddr.h	Mon Dec 12 17:37:03 2016 +0000
@@ -0,0 +1,28 @@
+
+
+
+class I2CInterface;
+//class DigitalOut;
+//class InterruptIn;
+
+class MPC4728_address_set{
+    I2CInterface *i2cd;
+    DigitalOut *LDAC;
+    DigitalOut *Cntout;
+    InterruptIn cntin;
+    int sclcnt;
+    unsigned char oldaddress;
+ void count_down( );
+ int ldac1;
+ int ldac0;
+ 
+public:
+ MPC4728_address_set(PinName sclcntpin, DigitalOut *LDACpin, I2CInterface* i2cdevice, DigitalOut *Cntoutpin , bool ldac_invert=false  );
+ int getsclcnt( ){return sclcnt;}
+  int readaddress(char* address, char *eepromaddr=0 , char *regaddr=0 );
+
+  int setaddress(char currentaddress, char newaddress );
+
+  void start_scl_cnt(int cnts) ;
+
+};//endclass