I2C code testing

Dependencies:   FreescaleIAP SimpleDMA mbed-rtos mbed

Fork of COM_MNG_TMTC_SIMPLE_pl123 by Siva ram

Revision:
56:a88e16f6c18e
Parent:
53:18db568f1098
Child:
58:5c59f28620bc
--- a/COM_MNG_TMTC.h	Thu Jan 14 10:32:40 2016 +0000
+++ b/COM_MNG_TMTC.h	Thu Jan 14 15:33:57 2016 +0000
@@ -1245,9 +1245,6 @@
                                     break;\
                                 }\
                             }\
-                            if ( reset_flag ==1 ){\
-                                reset_all;\
-                            }\
                         }\
                     }\
                 }\
@@ -1259,6 +1256,10 @@
                 break;\
             }\
         }\
+        if ( reset_flag ==1 ){\
+            reset_all;\
+            break;\
+        }\                        
     }\
 }
 
@@ -1336,6 +1337,9 @@
                                 /*gPC.printf("obosc tc inside normal tc at %u\r\n", execute_psc);*/\
                                 /*EXECUTION OF OBOSC TC*/\
                                 /*SKIP EXECUTION OF OBOSC HERE*/\
+                                if( execute_psc == (gTOTAL_VALID_TC-1) ){\
+                                    gMASTER_STATE = TCL_STATE_COMPLETED;\
+                                }\
                                 break;\
                             }\
                             else{\
@@ -1365,25 +1369,6 @@
                                 /*LAST TC IS EXECUTED*/\
                                 gMASTER_STATE = TCL_STATE_COMPLETED;\
                             }\
-                            else{\
-                                uint8_t check1 = 1;\
-                                for( uint8_t test_psc = execute_psc+1 ; test_psc < gTOTAL_VALID_TC ; ++test_psc ){\
-                                    Base_tc* test_TC = gHEAD_NODE_TCL;\
-                                    while(test_TC != NULL){\
-                                        if( GETpacket_seq_count(test_TC) == test_psc ){\
-                                            uint8_t checkval;\
-                                            isit_obosc(test_TC, checkval);\
-                                            if( checkval == 0 ){\
-                                                check1 = 0;\
-                                            }\
-                                        }\
-                                        test_TC = test_TC->next_TC;\
-                                    }\
-                                }\
-                                if( check1 == 0x01 ){\
-                                    gMASTER_STATE = TCL_STATE_COMPLETED;\
-                                }\
-                            }\
                             /*update last executed L1_ack*/\
                             if( put_tm_here != NULL ){\
                                 if( GETshort_or_long_tm(put_tm_here->fields) == SHORT_TM_CODE ){\
@@ -1470,25 +1455,6 @@
                             else if( execute_psc == (gTOTAL_VALID_TC-1) ){\
                                 gMASTER_STATE = TCL_STATE_COMPLETED;\
                             }\
-                            else{\
-                                uint8_t check1 = 1;\
-                                for( uint8_t test_psc = execute_psc+1 ; test_psc < gTOTAL_VALID_TC ; ++test_psc ){\
-                                    Base_tc* test_TC = gHEAD_NODE_TCL;\
-                                    while(test_TC != NULL){\
-                                        if( GETpacket_seq_count(test_TC) == test_psc ){\
-                                            uint8_t checkval;\
-                                            isit_obosc(test_TC, checkval);\
-                                            if( checkval == 0 ){\
-                                                check1 = 0;\
-                                            }\
-                                        }\
-                                        test_TC = test_TC->next_TC;\
-                                    }\
-                                }\
-                                if( check1 == 0x01 ){\
-                                    gMASTER_STATE = TCL_STATE_COMPLETED;\
-                                }\
-                            }\
                             /*update last executed L1_ack*/\
                             if( put_tm_here != NULL ){\
                                 if( GETshort_or_long_tm(put_tm_here->fields) == SHORT_TM_CODE ){\