Versão limpa em 04/09/2014. Telnet funcionando.
Dependencies: EthernetInterface mbed-rtos mbed NTPClient
Revision 19:682cb884ec00, committed 2015-03-27
- Comitter:
- mlucas82
- Date:
- Fri Mar 27 15:29:14 2015 +0000
- Parent:
- 5:6860bed2d096
- Child:
- 20:54e8563fb78c
- Child:
- 24:c9a5fd9fb667
- Commit message:
- Moved all calls to mbed_reset to a new function: "Pmed_reset"
Changed in this revision
--- a/Codes/Http_post.cpp Sat Oct 18 12:11:38 2014 +0000 +++ b/Codes/Http_post.cpp Fri Mar 27 15:29:14 2015 +0000 @@ -6,8 +6,6 @@ */ #include "Http_post.h" -extern "C" void mbed_reset(); - void HttpPost::HttpPost_Thread(void const *arg) { printf("HTTP POST Thread starting...\r\n"); @@ -99,7 +97,7 @@ fprintf(f, "Reset - Connect\n"); fclose(f); - mbed_reset(); + Pmed_reset(); } //Codigo para buscar o retorno do servidor HTTP @@ -125,7 +123,7 @@ fprintf(f, "Reset - Send\n"); fclose(f); - mbed_reset(); + Pmed_reset(); } sock.close();
--- a/Codes/TelnetCommands/telnet_update.cpp Sat Oct 18 12:11:38 2014 +0000 +++ b/Codes/TelnetCommands/telnet_update.cpp Fri Mar 27 15:29:14 2015 +0000 @@ -1,5 +1,5 @@ #include "TelnetServer.h" - +#include "Settings.h" char *header_msg = "firmware update\r\n\r\n"; char *usage_msg = "Wrong arguments\r\nUsage: update <firmware filename>\r\n\r\n"; @@ -11,7 +11,6 @@ char *operation_successful_msg = "Operation was completed successfully. Now resetting...\r\n\r\n"; extern LocalFileSystem local; -extern "C" void mbed_reset(); int TelnetServer::UpdateCommand(TCPSocketConnection *conn,char** argv,int argc) { @@ -86,7 +85,7 @@ //5 - reset delete conn; - mbed_reset(); + Pmed_reset(); return 0; }
--- a/Headers/Settings.h Sat Oct 18 12:11:38 2014 +0000 +++ b/Headers/Settings.h Fri Mar 27 15:29:14 2015 +0000 @@ -27,6 +27,14 @@ #define LENGTH_MAIL_BOX 10U #define MAXTRIES 10U +extern "C" void mbed_reset(); + +static void Pmed_reset() +{ + mbed_reset(); +} + + class Settings {
--- a/main.cpp Sat Oct 18 12:11:38 2014 +0000 +++ b/main.cpp Fri Mar 27 15:29:14 2015 +0000 @@ -183,3 +183,4 @@ Thread::yield(); } } +