Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: cc3000_hello_world_demo cc3000_simple_socket_demo cc3000_ntp_demo cc3000_ping_demo ... more
Revision 48:192e2fde71e9, committed 2015-02-28
- Comitter:
- frankvnk
- Date:
- Sat Feb 28 16:40:39 2015 +0000
- Parent:
- 47:a63fe1a4f568
- Commit message:
- Have TCPSocketServer::accept return the real accept values as defined in http://processors.wiki.ti.com/index.php/Non_blocking_accept; Fixed cc3000::init(const char *ip, const char *mask, const char *gateway) - missing _wlan.start(0);
Changed in this revision
| Socket/TCPSocketServer.cpp | Show annotated file Show diff for this revision Revisions of this file | 
| cc3000.cpp | Show annotated file Show diff for this revision Revisions of this file | 
--- a/Socket/TCPSocketServer.cpp	Tue Jan 20 09:04:49 2015 +0000
+++ b/Socket/TCPSocketServer.cpp	Sat Feb 28 16:40:39 2015 +0000
@@ -73,7 +73,7 @@
     socklen_t newSockRemoteHostLen = sizeof(connection._remote_host);
     int fd = _cc3000_module->_socket.accept(_sock_fd, (sockaddr *) &connection._remote_host, &newSockRemoteHostLen);
     if (fd < 0) {
-        return -1;
+        return fd;
     }
     /* s_addr is returned in the little endian */
     connection._remote_host.sin_addr.s_addr = htonl(connection._remote_host.sin_addr.s_addr);
--- a/cc3000.cpp	Tue Jan 20 09:04:49 2015 +0000
+++ b/cc3000.cpp	Sat Feb 28 16:40:39 2015 +0000
@@ -99,6 +99,7 @@
 }
 
 void cc3000::init(const char *ip, const char *mask, const char *gateway) {
+    _wlan.start(0);
     _netapp.dhcp((uint32_t *)ip, (uint32_t *)mask, (uint32_t *)gateway, (uint32_t *)ip); //dns = ip
     _wlan.stop();
     wait(1);
     SimpleLink Wi-Fi CC3000
            SimpleLink Wi-Fi CC3000
         Avnet Wi-Go System
            Avnet Wi-Go System