None
Fork of cc3000_hostdriver_mbedsocket by
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);
Jack Berkhout
