Tests for LWIPInterface
Dependencies: LWIPInterface NSAPITests NetworkSocketAPI mbed-rtos mbed
Revision 3:50ac0af2ea9c, committed 2016-04-21
- 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
diff -r 9181decb4d5c -r 50ac0af2ea9c LWIPInterface.lib --- 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
diff -r 9181decb4d5c -r 50ac0af2ea9c NSAPITests.lib --- 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
diff -r 9181decb4d5c -r 50ac0af2ea9c NetworkSocketAPI.lib --- 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
diff -r 9181decb4d5c -r 50ac0af2ea9c main.cpp --- 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); }