Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FreescaleIAP mbed-rtos mbed
Fork of workinQM_10thDec by
Diff: main.cpp
- Revision:
- 57:60e8f00d93c3
- Parent:
- 55:6ea0d7e9fce2
- Child:
- 59:0fc0bfafaa9f
--- a/main.cpp	Sun Aug 07 07:49:52 2016 +0000
+++ b/main.cpp	Sun Sep 04 13:08:33 2016 +0000
@@ -909,8 +909,8 @@
         wait_us(300);
                  
         BAE_MNG_I2C_STATUS =1 ;
-        I2C_last.reset();
-        I2C_last.start();
+        //I2C_last.reset();
+        //I2C_last.start();
        // pc.printf("\n\r intrpet");
         if( slave.receive() == 0)
         {
@@ -958,7 +958,9 @@
                     {                  
                         pc.printf("\n\rWrite HK success");
                        // data_send_flag = 'h';
-                        irpt_2_mstr = 0;                                //////////edited
+                        irpt_2_mstr = 0;
+                        I2C_last.reset();
+                        I2C_last.start();                                //////////edited
                     }
                     else
                     {
@@ -1008,6 +1010,8 @@
                     if(((pdir_tm1 & 0x00000003)==3))
                     {                  
                         pc.printf("\n\rWrite TM success");
+                        I2C_last.reset();
+                        I2C_last.start();
                     }
                     else
                     {
@@ -1066,7 +1070,9 @@
                         {
                             FCTN_CDMS_HK_TC((uint8_t*) telecommand);        /////////////edited
                             data_send_flag = 'h';
-                            pc.printf("\n\n\rRead LBCN QM is comming");      
+                            pc.printf("\n\n\rRead LBCN QM is comming");
+                            I2C_last.reset();
+                            I2C_last.start();      
                         }                            
                     else                   
                     {
@@ -1074,6 +1080,8 @@
                         FCTN_BAE_TM_TC((uint8_t*) telecommand);
                         data_send_flag = 't';
                         irpt_2_mstr = 1;
+                        I2C_last.reset();
+                        I2C_last.start();
                       
                     }
                 }
    