![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
check the commit mesg
Fork of slave_working1_1 by
Revision 9:baf5de5828c9, committed 2014-12-19
- Comitter:
- greenroshks
- Date:
- Fri Dec 19 17:59:00 2014 +0000
- Parent:
- 8:04b912dc2443
- Commit message:
- slave working... in this code, the while loop will be executed only if interrupt is 1 hence breaking the loop
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 04b912dc2443 -r baf5de5828c9 main.cpp --- a/main.cpp Sat Dec 13 11:22:34 2014 +0000 +++ b/main.cpp Fri Dec 19 17:59:00 2014 +0000 @@ -27,7 +27,7 @@ { int slave_status = 1; - while(slave_status) + while(slave_status && interrupt ==1) { slave.address(0x20); if(slave.receive()==1) @@ -81,7 +81,8 @@ //temp = i2c_status; } } - + + data_ready=0; } } @@ -101,8 +102,9 @@ { char data='a'; - data_ready=0; + //data_ready=0; data = pc.getc(); + reset =0; i2c_status=1; i2c_data * i2c_data_s = i2c_data_send.alloc();