Test for mike

Dependencies:   mbed DevInterfaces MCP4728 MCP4728setaddr I2Cinterfaces

Files at this revision

API Documentation at this revision

Comitter:
wbeaumont
Date:
Fri Jan 13 14:00:15 2017 +0000
Parent:
4:527490fdcfd8
Child:
6:d1e569f370ac
Commit message:
revert to MPC4728test

Changed in this revision

MCP4728setaddr.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/MCP4728setaddr.lib	Fri Jan 13 12:45:37 2017 +0000
+++ b/MCP4728setaddr.lib	Fri Jan 13 14:00:15 2017 +0000
@@ -1,1 +1,1 @@
-MCP4728setaddr#bb5afe877b43
+https://developer.mbed.org/users/wbeaumont/code/MCP4728setaddr/#1ba04e54bd3c
--- a/main.cpp	Fri Jan 13 12:45:37 2017 +0000
+++ b/main.cpp	Fri Jan 13 14:00:15 2017 +0000
@@ -57,7 +57,7 @@
         int newaddrint;
         // Set addr part 
         MPC4728_address_set mpc4728(PTB0,&LDAC,i2cdev, &CntPin);
-        int i2cresult =mpc4728.readaddress(&oldaddr, &eeaddr, &regaddr);
+        int i2cresult =mpc4728.readaddress(oldaddr, eeaddr, regaddr);
         if ( i2cresult ) {
             printf("failed to read current address error code: %d , scl cnt = %d  \n", i2cresult,mpc4728.getsclcnt() );
         }
@@ -71,7 +71,7 @@
                 if ( i2cresult ) printf("failed to set address to %d error : %d , sclcnt= %d  \n",newaddr, i2cresult,mpc4728.getsclcnt());
                 else {
                      printf("set new  address \n");
-                    i2cresult =mpc4728.readaddress(&oldaddr, &eeaddr, &regaddr);
+                    i2cresult =mpc4728.readaddress(oldaddr, eeaddr, regaddr);
                     if ( i2cresult ) printf("failed to read (new)  address error : %d  \n", i2cresult);
                     else     printf( "new address = %d ,eeaddr %d , regaddr %d  sclcnt= %d  \n\r", (int) oldaddr,(int) eeaddr, (int)regaddr, mpc4728.getsclcnt());  printf( " new address = %d \n", (int) oldaddr);
                 }