Webserver only w/o any other functions, single thread. Running on STM32F013+W5500

Dependencies:   NTPClient W5500Interface Watchdog device_configuration eeprom_flash mbed-rpc-nucleo mbed-rtos mbed

Fork of F103-Serial-to-Ethernet by Chau Vo

Revision:
33:c906ccc220ba
Parent:
32:db2e8ea06ee1
Child:
34:32299b819067
--- a/main.cpp	Sun Jan 25 11:49:44 2015 +0000
+++ b/main.cpp	Sun Jan 25 14:04:04 2015 +0000
@@ -296,9 +296,7 @@
     /*
     * UI threads
     */
-    if (auto_transmit_flag == 0xA5A5) {
-        Thread t2(auto_update_timer_thread);
-    }
+    Thread t2(auto_update_timer_thread);
     Thread t3(wdt_reset_thread);
 
     /*
@@ -338,7 +336,7 @@
     */
     while (true) {
 #ifdef TCP_CLIENT // auto update device status to a remote TCP server
-        if (auto_transmit_flag == 0xA5A5) {
+        if (auto_transmit_flag == DEFAULT_ENABLE_FLAG_VALUE) {
             // connect to TCP server if required
             if (!tcp_sock.is_connected()) {
                 ret = tcp_sock.connect(str_server_ip_addr, u16tcp_server_port); // timeout is default in connect() in W5500.h
@@ -564,6 +562,7 @@
 
                 DBG("Received user configuration");
                 write_eeprom_network(&received_buffer[strlen(DEVICE_CONFIG_CODE)]); // parameters from 5th char, 15-bytes
+                NVIC_SystemReset();
                 break;
             }
             // length = 12, SET TCP SERVER CONFIGURATION
@@ -579,6 +578,7 @@
 
                 DBG("Received TCP server configuration");
                 write_eeprom_tcpserver(&received_buffer[strlen(DEVICE_CONFIG_CODE)]); // parameters from 5th char
+                NVIC_SystemReset();
                 break;
             }
             default: