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: SDFileSystem dspmodified mbed
Diff: merged_code.cpp
- Revision:
- 20:764af4c48cf2
- Parent:
- 18:4e3aa33674c8
- Child:
- 21:9e71641aeac8
--- 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 //
//--------------------------------------------------------------------------------------------------//