storing variables in single array for transmission
Dependencies: SDFileSystem dspmodified mbed
Fork of FTPGET_Merged by
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 // //--------------------------------------------------------------------------------------------------//