Host library for controlling a WiConnect enabled Wi-Fi module.

Dependents:   wiconnect-ota_example wiconnect-web_setup_example wiconnect-test-console wiconnect-tcp_server_example ... more

Revision:
7:41d456a65f14
Parent:
6:8a87a59d0d21
Child:
8:1fad4ca6c6a4
--- a/internal/network/NetworkJoin.cpp	Mon Aug 11 13:55:07 2014 -0700
+++ b/internal/network/NetworkJoin.cpp	Mon Aug 11 16:16:02 2014 -0700
@@ -114,17 +114,18 @@
 
 #ifdef WICONNECT_ASYNC_TIMER_ENABLED
 
+static char joinStatusMonitor_responseBuffer[4];
+static uint8_t joinStatusMonitor_cmdBuffer[sizeof(QueuedCommand)];
+
 /*************************************************************************************************/
 // this is called every 1s by the monitorTimer
 void NetworkInterface::joinStatusMonitor()
 {
-    static char responseBuffer[4];
-    static uint8_t cmdBuffer[sizeof(QueuedCommand)];
-    QueuedCommand *cmd = (QueuedCommand*)cmdBuffer;
+    QueuedCommand *cmd = (QueuedCommand*)joinStatusMonitor_cmdBuffer;
 
     monitorTimer.stop();
 
-   *cmd = QueuedCommand(sizeof(responseBuffer), responseBuffer, "get network.status");
+   *cmd = QueuedCommand(sizeof(joinStatusMonitor_responseBuffer), joinStatusMonitor_responseBuffer, "get network.status");
 
     wiconnect->enqueueCommand(cmd, Callback(this, &NetworkInterface::joinStatusCheckCallback));
 }