CDMS code for testing sbc

Dependencies:   FreescaleIAP SimpleDMA mbed-rtos mbed

Fork of CDMS_CODE by shubham c

Revision:
240:946a9342a95f
Parent:
235:c127b15409b2
--- a/CDMS_PL.h	Thu Jul 07 17:25:37 2016 +0000
+++ b/CDMS_PL.h	Thu Jul 07 18:43:12 2016 +0000
@@ -74,7 +74,14 @@
     tm_ptr_standby =  FCTN_CDMS_RLY_TMTC(pl_tc_standby);\
     VERIFY_TM(tm_ptr_standby);\
     delete pl_tc_standby;\
-    delete tm_ptr_standby;\
+    Base_tm *temp;\
+    temp = tm_ptr_standby;\
+    while(tm_ptr_standby!=NULL)\
+    {\
+        temp = temp->next_TM;\
+        delete tm_ptr_standby;\
+        tm_ptr_standby = temp;\        
+    }\
 }
 
 //TC_string[0] should not be 0x00
@@ -100,7 +107,14 @@
     tm_ptr_hibernate =  FCTN_CDMS_RLY_TMTC(pl_tc_hibernate);\
     VERIFY_TM(tm_ptr_hibernate);\
     delete pl_tc_hibernate;\
-    delete tm_ptr_hibernate;\
+    Base_tm *temp;\
+    temp = tm_ptr_hibernate;\
+    while(tm_ptr_hibernate!=NULL)\
+    {\
+        temp = temp->next_TM;\
+        delete tm_ptr_hibernate;\
+        tm_ptr_hibernate = temp;\        
+    }\
 }
 
 //TC_string[0] should not be 0x00
@@ -127,7 +141,14 @@
     tm_ptr_science =  FCTN_CDMS_RLY_TMTC(pl_tc_science);\
     VERIFY_TM(tm_ptr_science);\
     delete pl_tc_science;\
-    delete tm_ptr_science;\
+    Base_tm *temp;\
+    temp = tm_ptr_science;\
+    while(tm_ptr_science!=NULL)\
+    {\
+        temp = temp->next_TM;\
+        delete tm_ptr_science;\
+        tm_ptr_science = temp;\        
+    }\
 }
 void print_processed_block(uint8_t index)
 {