CDMS_CODE_samp_23SEP_DMA_flag

Dependencies:   FreescaleIAP SimpleDMA mbed-rtos mbed

Fork of CDMS_CODE_samp_23SEP_DMA by iitm sat

Revision:
198:17200a427e71
Parent:
197:1369ef45b49e
Child:
210:f4acf895b598
--- a/COM_MNG_TMTC.h	Thu Jun 30 10:51:38 2016 +0000
+++ b/COM_MNG_TMTC.h	Thu Jun 30 13:01:42 2016 +0000
@@ -217,9 +217,14 @@
                 {
                     
                     //printf("receiving...\r\n");
-                    FCTN_I2C_READ((char*)tm_pointer->TM_string,135);
+                    int r = FCTN_I2C_READ((char*)tm_pointer->TM_string,135);
                     //printf("%s", tm_pointer->TM_string);
-                    received+=1;
+                    if(r)
+                    {
+                        received = 0;
+                        }
+                        else received = 1;
+                    
                     break; //only for testing purpose
                 }
                 else