Threads + Network Demo

Dependencies:   EthernetInterface mbed-rtos mbed-src

Fork of TestNetComm by Malcolm Nixon

Revision:
2:d62b28f02d45
Parent:
1:429f7bca62aa
Child:
3:1e86c29d1eac
--- a/main.cpp	Sun May 04 02:39:28 2014 +0000
+++ b/main.cpp	Sun May 04 02:49:24 2014 +0000
@@ -2,6 +2,17 @@
 #include "Thread.h"
 #include "mbed.h"
 
+void ledThreadProc(const void *param)
+{
+    DigitalOut led2(LED2);
+    
+    for (;;)
+    {
+        led2 = !led2;
+        Thread::wait(500);
+    }
+}
+    
 
 int main(void)
 {
@@ -12,7 +23,7 @@
     EthernetInterface eth;
     eth.init("192.168.5.100", "255.255.255.0", "0.0.0.0");
     eth.connect();
-
+    
     // Construct the server
     TCPSocketServer svr;
     svr.bind(1234);