no honeycomb

Dependencies:   mbed-rtos mbed

Revision:
1:7017c91e63da
Parent:
0:ebdf4f859dca
Child:
2:081ff4d93e91
--- a/main.cpp	Fri Dec 19 06:47:25 2014 +0000
+++ b/main.cpp	Sat Dec 20 05:24:49 2014 +0000
@@ -250,7 +250,7 @@
 {
        int slave_status = 1;
    
-    while(slave_status)
+    while(slave_status && interrupt == 1  )
     {                 
             slave.address(0x20);
             if(slave.receive()==1)
@@ -304,6 +304,7 @@
                 printf("\nData sent to CDMS is %s\n\r",data_send);
                 i2c_data_send.free(i2c_data_s);
                 i2c_status = 0;
+                data_ready = 0;
                 //temp = i2c_status;
                 
             }
@@ -348,7 +349,7 @@
         strcat(hk_data,spower_mode);*/
         strcat(hk_data,fdata);
         printf("\nhk data : %s\n",hk_data);
-        data_ready=0;
+       
         //data = pcslave.getc();
         reset =0;
         i2c_status=1;
@@ -421,6 +422,7 @@
     
      FUNC_ACS_MAG_INIT();
      FUNC_ACS_INIT_GYR();
+     data_ready = 0;
 
     ptr_t_hk_acq = new Thread(T_HK_ACQ);
     ptr_t_acs = new Thread(T_ACS);
@@ -459,6 +461,7 @@
       
     master_reset.fall(&FUNC_I2C_RESET);
     interrupt.rise(&FUNC_I2C_INT);
+    //interrupt.fall(&
        
     while(1)
     {