Tests for LWIPInterface

Dependencies:   LWIPInterface NSAPITests NetworkSocketAPI mbed-rtos mbed

Files at this revision

API Documentation at this revision

Comitter:
Christopher Haster
Date:
Thu Apr 21 01:55:23 2016 -0500
Parent:
2:9181decb4d5c
Commit message:
Updated NSAPITests to match changes to the NSAPI

Changed in this revision

LWIPInterface.lib Show annotated file Show diff for this revision Revisions of this file
NSAPITests.lib Show annotated file Show diff for this revision Revisions of this file
NetworkSocketAPI.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/LWIPInterface.lib	Wed Mar 09 07:04:37 2016 +0000
+++ b/LWIPInterface.lib	Thu Apr 21 01:55:23 2016 -0500
@@ -1,1 +1,1 @@
-http://developer.mbed.org/teams/NetworkSocketAPI/code/LWIPInterface/#0c271431385e
+http://developer.mbed.org/teams/NetworkSocketAPI/code/LWIPInterface/#8b55d035d127
--- a/NSAPITests.lib	Wed Mar 09 07:04:37 2016 +0000
+++ b/NSAPITests.lib	Thu Apr 21 01:55:23 2016 -0500
@@ -1,1 +1,1 @@
-http://developer.mbed.org/teams/NetworkSocketAPI/code/NSAPITests/#07b22947be75
+http://developer.mbed.org/teams/NetworkSocketAPI/code/NSAPITests/#0d938ec9100c
--- a/NetworkSocketAPI.lib	Wed Mar 09 07:04:37 2016 +0000
+++ b/NetworkSocketAPI.lib	Thu Apr 21 01:55:23 2016 -0500
@@ -1,1 +1,1 @@
-http://developer.mbed.org/teams/NetworkSocketAPI/code/NetworkSocketAPI/#c3dfac768d9d
+http://developer.mbed.org/teams/NetworkSocketAPI/code/NetworkSocketAPI/#96627c4b83d5
--- a/main.cpp	Wed Mar 09 07:04:37 2016 +0000
+++ b/main.cpp	Thu Apr 21 01:55:23 2016 -0500
@@ -20,15 +20,29 @@
 
 LWIPInterface iface;
 
+Ticker blinker;
+DigitalOut led(LED_GREEN);
+void blink() {
+    led = !led;
+}
+
 int main()
 {
-    int32_t result = iface.connect();
+    blinker.attach(blink, 0.5);
 
+    int result = iface.connect();
     if (result) {
         printf("Interface failed to connect with code %d\r\n", result);
-    } else {
-        nsapi_tests("BSDInterface Tests", &iface, "0.0.0.0", 4000);
-        iface.disconnect();
+        while (1);
     }
+
+    nsapi_tests("LWIPInterface Tests", &iface, "0.0.0.0", 4000);
+
+    result = iface.disconnect();
+    if (result) {
+        printf("Interface failed to disconnect with code %d\r\n", result);
+        while (1);
+    }
+
     while(1);
 }