Azure IoT common library

Fork of azure_c_shared_utility by Azure IoT

Revision:
34:651c23af382c
Parent:
33:5f2a48fc7e5b
--- a/platform_mbed.cpp	Tue Aug 22 13:22:47 2017 +0100
+++ b/platform_mbed.cpp	Thu Aug 24 14:14:15 2017 +0100
@@ -4,34 +4,17 @@
 #include "azure_c_shared_utility/platform.h"
 #include "EthernetInterface.h"
 #include "NetworkInterface.h"
-#include "NTPClient.h"
+
 #include "azure_c_shared_utility/optimize_size.h"
 #include "azure_c_shared_utility/xio.h"
 #include "azure_c_shared_utility/tlsio_wolfssl.h"
 
-int setupRealTime(NetworkInterface* net)
-{
-    int result = 0;
-
-    NTPClient ntp(*net);
-
-    if (ntp.setTime("1.pool.ntp.org") != 0)
-    {
-        result = __FAILURE__;
-    }
-
-    return result;
-}
+static NetworkInterface* _platform_mbed_network;
 
 int platform_init(NetworkInterface* net)
 {
     int result = 0;
-
-    if (setupRealTime(net) != 0)
-    {
-        result = __FAILURE__;
-    }
-
+    _platform_mbed_network = net;
     return result;
 }
 
@@ -46,3 +29,7 @@
 }
 
 void platform_deinit(void) {}
+
+NetworkInterface* platform_get_network_stack() {
+    return _platform_mbed_network;
+}