![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
check commmit messgae
Fork of master_working_1_2 by
Diff: main.cpp
- Revision:
- 3:7a895e0fdd45
- Parent:
- 2:e80af3c366aa
diff -r e80af3c366aa -r 7a895e0fdd45 main.cpp --- a/main.cpp Mon Dec 15 05:51:25 2014 +0000 +++ b/main.cpp Fri Dec 19 18:00:32 2014 +0000 @@ -54,7 +54,7 @@ }*/ - + //wait(0.5); while(ack0) { //printf("2 master clk freq setup and addressing slave\n\r"); @@ -62,7 +62,7 @@ master.start(); //initiating the data transfer ack0 = master.read(addr,data,length); } - if(!ack0) + if(!ack0 && data_ready ==1) { printf("\n master has read %c from slave\n\r",*data); loopvariable0=false; @@ -117,7 +117,7 @@ i2c_data *i2c_data_s = (i2c_data*)evt.value.p; *writedata = i2c_data_s -> data; master.frequency(100000); //set clock frequency - while(write2slave) + while(write2slave && interrupt ==1) { printf("master clk freq setup and addressing slave\n\r"); master.start(); //initiating the data transfer