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

Files at this revision

API Documentation at this revision

Comitter:
dan_ackme
Date:
Mon Aug 11 16:16:02 2014 -0700
Parent:
6:8a87a59d0d21
Child:
8:1fad4ca6c6a4
Commit message:
made static buffers global

Changed in this revision

internal/network/NetworkJoin.cpp Show annotated file Show diff for this revision Revisions of this file
internal/network/NetworkWebSetup.cpp Show annotated file Show diff for this revision Revisions of this file
--- 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));
 }
--- a/internal/network/NetworkWebSetup.cpp	Mon Aug 11 13:55:07 2014 -0700
+++ b/internal/network/NetworkWebSetup.cpp	Mon Aug 11 16:16:02 2014 -0700
@@ -113,17 +113,17 @@
 
 
 #ifdef WICONNECT_ASYNC_TIMER_ENABLED
+static char webSetupStatusMonitor_responseBuffer[4];
+static uint8_t webSetupStatusMonitor_cmdBuffer[sizeof(QueuedCommand)];
 
 /*************************************************************************************************/
 void NetworkInterface::webSetupStatusMonitor()
 {
-    static char responseBuffer[4];
-    static uint8_t cmdBuffer[sizeof(QueuedCommand)];
-    QueuedCommand *cmd = (QueuedCommand*)cmdBuffer;
+    QueuedCommand *cmd = (QueuedCommand*)webSetupStatusMonitor_cmdBuffer;
 
     monitorTimer.stop();
 
-    *cmd = QueuedCommand(sizeof(responseBuffer), responseBuffer, "setup status");
+    *cmd = QueuedCommand(sizeof(webSetupStatusMonitor_responseBuffer), webSetupStatusMonitor_responseBuffer, "setup status");
 
     wiconnect->enqueueCommand(cmd, Callback(this, &NetworkInterface::webSetupStatusCheckCallback));
 }