Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of freemaster2_1 by
Revision 1:8e4b5e1f8039, committed 2014-12-08
- Comitter:
- raizel_varun
- Date:
- Mon Dec 08 03:54:47 2014 +0000
- Parent:
- 0:9ea68477caaf
- Commit message:
- master 3
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file | 
--- a/main.cpp	Sat Dec 06 06:22:50 2014 +0000
+++ b/main.cpp	Mon Dec 08 03:54:47 2014 +0000
@@ -13,11 +13,13 @@
             char *data =  new char;
             *data = 'b';
             bool loopvariable0 = true;
-            while(loopvariable0){
-                printf("2 master clk freq setup and addressing slave\n\r");
-                master.frequency(100000);                       //set clock frequency
+             master.frequency(100000);                       //set clock frequency
+             //master.start();
+            while(ack0){
+                //printf("2 master clk freq setup and addressing slave\n\r");
+               
                 master.start();                                 //initiating the data transfer
-                ack0 = (bool) master.read(addr,data,1);
+                ack0 = (bool) master.read(addr,data,1);}
                 if(!ack0){
                     printf("3 master has read %c from slave\n\r",*data);
                     loopvariable0=false;
@@ -26,4 +28,4 @@
             printf("done\n\r");
         }
     }
-}           
\ No newline at end of file
+           
\ No newline at end of file
    