hkdata recieve using string working

Dependencies:   mbed-rtos mbed

Fork of BAE_vr2_1_0_hkdata by Seeker of Truth ,

Revision:
4:cf8d2c7b65ad
Parent:
3:e1dc841fca6d
Child:
5:29ec04694833
--- a/main.cpp	Tue Dec 16 07:43:16 2014 +0000
+++ b/main.cpp	Tue Dec 16 10:17:03 2014 +0000
@@ -98,19 +98,25 @@
 }
 
 char writedata[13];
+bool write2slave;
+bool master_status_write;
 void FUNC_MASTER_WRITE()
-{
-    bool write2slave=true;
+{   //wait(1);
+    write2slave=true;
    
-    interrupt = 0;
+    interrupt = 1;
      
-    char data[13]="shakti priya";
+    char data[13];
+    strcpy(data,"sakthi");
+    strcat(data,"priya");
     i2c_data * i2c_data_s = i2c_data_send.alloc();
     strcpy(i2c_data_s->data ,data);
     i2c_data_s->length = 13;
     i2c_data_send.put(i2c_data_s); 
-    bool master_status_write = true;
-    interrupt = 1; 
+    master_status_write = true;
+    
+   // interrupt = 1; 
+
     osEvent evt = i2c_data_send.get();
             if (evt.status == osEventMail) 
             {
@@ -130,6 +136,7 @@
                 i2c_data_send.free(i2c_data_s);
                 }
             }
+            interrupt = 0;
 }
 
     
@@ -140,9 +147,11 @@
     data_ready.rise(&FUNC_INT);
     printf("\nstarted master\n"); 
     while(1)
-    { 
-      //Thread::wait(10000);
-     // FUNC_MASTER_WRITE();  
+    { Thread::wait(8000);
+    //interrupt = 1;
+      
+      FUNC_MASTER_WRITE(); 
+      //interrupt = 0; 
       ;
     }
 }           
\ No newline at end of file