storing variables in single array for transmission

Dependencies:   SDFileSystem dspmodified mbed

Fork of FTPGET_Merged by Pravin Magar

Revision:
20:764af4c48cf2
Parent:
18:4e3aa33674c8
Child:
21:9e71641aeac8
diff -r 4e3aa33674c8 -r 764af4c48cf2 merged_code.cpp
--- a/merged_code.cpp	Tue Jun 23 12:17:18 2015 +0000
+++ b/merged_code.cpp	Tue Jun 23 12:36:20 2015 +0000
@@ -80,6 +80,10 @@
     NVIC_SystemReset();
 }
 
+
+
+
+
 //--------------------------------------------------------------------------------------------------//
 //                  Send AT Command (1 response with clk variable)                                                    //
 //--------------------------------------------------------------------------------------------------//
@@ -128,6 +132,22 @@
     //pc.printf("\r\nanswer %d\r\n",answer);
     return answer;
 }
+
+//--------------------------------------------------------------------------------------------------//
+//                  iteration                                                     
+//--------------------------------------------------------------------------------------------------//
+
+bool iteration_send_ATcommand(char* ATcommand, char* expected_answer, unsigned int timeout, int clk_flag,int attempts)
+{ 
+    for(int i=0; i < attempts; i++)
+    {
+        if(sendATcommand(ATcommand,expected_answer,timeout,clk_flag))
+        { 
+           return 1;
+        }
+    }
+    return 0 ;
+}
 //--------------------------------------------------------------------------------------------------//
 //                  Getting Timestamp Function                                                      //
 //--------------------------------------------------------------------------------------------------//