![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
master working
Fork of master_working_1_2_reset_test by
Revision 5:cb35b461fa29, committed 2015-01-22
- Comitter:
- sakthipriya
- Date:
- Thu Jan 22 14:34:49 2015 +0000
- Parent:
- 4:7992ea5e41ed
- Commit message:
- master working
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Jan 20 16:12:54 2015 +0000 +++ b/main.cpp Thu Jan 22 14:34:49 2015 +0000 @@ -42,8 +42,8 @@ - master.frequency(100000); //set clock frequency - //master.start(); + // master.frequency(100000); //set clock frequency + master.start(); /*while(write2slave) { *writedata = pc.getc(); wait(0.5); @@ -73,7 +73,7 @@ if(!ack0 ) { printf("\n master has read %c from slave\n\r",*data); - printf("\n \r %d %d %d %d %d\n",*data_reg,*status_reg,*c1_reg,*c2_reg,*freq_reg); + //printf("\n \r %d %d %d %d %d\n",*data_reg,*status_reg,*c1_reg,*c2_reg,*freq_reg); loopvariable0=false; } //master.stop(); @@ -125,7 +125,7 @@ { i2c_data *i2c_data_s = (i2c_data*)evt.value.p; *writedata = i2c_data_s -> data; - master.frequency(100000); //set clock frequency + //master.frequency(100000); //set clock frequency while(write2slave && interrupt ==1) { printf("master clk freq setup and addressing slave\n\r"); @@ -137,7 +137,7 @@ write2slave=false; } i2c_data_send.free(i2c_data_s); - printf("\n \r %d %d %d %d %d\n",*data_reg,*status_reg,*c1_reg,*c2_reg,*freq_reg); + //printf("\n \r %d %d %d %d %d\n",*data_reg,*status_reg,*c1_reg,*c2_reg,*freq_reg); } } } @@ -147,6 +147,7 @@ int main() { int i= 0; + master.frequency(100000); ptr_t_i2c = new Thread(T_I2C_MASTER_FSLAVE); data_ready.rise(&FUNC_INT); printf("\nstarted master\n");