Socket interface for C027Interface. Implements the NetworkSocketAPI

Dependencies:   C027_Support

Dependents:   HelloC027Interface U_Blox_DeviceConnector U_Blox_DeviceConnector U-Blox_Client

Fork of LWIPInterface by NetworkSocketAPI

Revision:
16:eaf31bd133f0
Parent:
15:21d4f56eb172
Child:
17:3f1e33e638a4
--- a/C027Interface.cpp	Tue Apr 26 20:34:29 2016 +0000
+++ b/C027Interface.cpp	Thu Feb 02 16:17:35 2017 +0000
@@ -207,6 +207,17 @@
     return recv;
 }
 
+void C027Interface::_run()
+{
+    while (true) {
+        _callback(_data);
+        wait(0.25f);
+    }
+}
+
 void C027Interface::socket_attach(void *handle, void (*callback)(void *), void *data)
 {
+    _callback = callback;
+    _data = data;
+    _thread.start(this, &C027Interface::_run);
 }