Wiflash demo program
Dependencies: EthernetInterface mbed-rtos mbed wiflash
Fork of TCPSocket_HelloWorld by
Revision 16:7735da154f2f, committed 2015-04-30
- Comitter:
- adhithyan15
- Date:
- Thu Apr 30 23:58:32 2015 +0000
- Parent:
- 15:69e41cbbc8ac
- Commit message:
- Wiflash demo program
Changed in this revision
--- a/EthernetInterface.lib Sun Sep 21 05:55:13 2014 +0000 +++ b/EthernetInterface.lib Thu Apr 30 23:58:32 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/EthernetInterface/#5887ae6c0c2c +http://mbed.org/users/mbed_official/code/EthernetInterface/#2fc406e2553f
--- a/main.cpp Sun Sep 21 05:55:13 2014 +0000 +++ b/main.cpp Thu Apr 30 23:58:32 2015 +0000 @@ -1,31 +1,11 @@ #include "mbed.h" #include "EthernetInterface.h" +#include "wiflash.h" // Include our wiflash library + +Wiflash wf; // Pass in a reference to the Ethernet interface object to the Wiflash object + int main() { - EthernetInterface eth; - eth.init(); //Use DHCP - eth.connect(); - printf("IP Address is %s\n", eth.getIPAddress()); - - TCPSocketConnection sock; - sock.connect("mbed.org", 80); - - char http_cmd[] = "GET /media/uploads/mbed_official/hello.txt HTTP/1.0\n\n"; - sock.send_all(http_cmd, sizeof(http_cmd)-1); - - char buffer[300]; - int ret; - while (true) { - ret = sock.receive(buffer, sizeof(buffer)-1); - if (ret <= 0) - break; - buffer[ret] = '\0'; - printf("Received %d chars from server:\n%s\n", ret, buffer); - } - - sock.close(); - - eth.disconnect(); - - while(1) {} + wf.setUp(); + printf("Inside main!\n"); }
--- a/mbed-rtos.lib Sun Sep 21 05:55:13 2014 +0000 +++ b/mbed-rtos.lib Thu Apr 30 23:58:32 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed-rtos/#631c0f1008c3 +http://mbed.org/users/mbed_official/code/mbed-rtos/#34292fba723c
--- a/mbed.bld Sun Sep 21 05:55:13 2014 +0000 +++ b/mbed.bld Thu Apr 30 23:58:32 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/552587b429a1 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/433970e64889 \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/wiflash.lib Thu Apr 30 23:58:32 2015 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/adhithyan15/code/wiflash/#6b372eb53d67