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
Diff: Socket/Socket.cpp
- Revision:
- 11:5e3771b29385
- Parent:
- 8:4c42ca37ba33
- Child:
- 12:1c2a856c618a
- Child:
- 13:5e36c267e62f
--- a/Socket/Socket.cpp Tue Oct 01 04:41:47 2013 +0000
+++ b/Socket/Socket.cpp Tue Oct 01 21:17:44 2013 +0000
@@ -29,7 +29,7 @@
int Socket::init_socket(int type, int protocol) {
if (_sock_fd != -1) {
#if (CC3000_DEBUG == 1)
- printf("DEBUG: Socket was initialized previously.\n");
+ printf("DEBUG: Socket was initialized previously.\r\n");
#endif
return -1;
}
@@ -37,12 +37,12 @@
int fd = _cc3000_module->_socket.socket(AF_INET, type, protocol);
if (fd < -1) {
#if (CC3000_DEBUG == 1)
- printf("DEBUG: Failed to create new socket (type: %d, protocol: %d).\n",type, protocol);
+ printf("DEBUG: Failed to create new socket (type: %d, protocol: %d).\r\n",type, protocol);
#endif
return -1;
}
#if (CC3000_DEBUG == 1)
- printf("DEBUG: Socket created (fd: %d type: %d, protocol: %d).\n",fd, type, protocol);
+ printf("DEBUG: Socket created (fd: %d type: %d, protocol: %d).\r\n",fd, type, protocol);
#endif
_sock_fd = fd;
@@ -76,7 +76,7 @@
int ret = _cc3000_module->_socket.select(_sock_fd+1, readset, writeset, NULL, timeout);
#if (CC3000_DEBUG == 1)
- printf("DEBUG: Select on sock_fd: %d, returns %d. fdSet: %d\n",_sock_fd, ret, fdSet);
+ printf("DEBUG: Select on sock_fd: %d, returns %d. fdSet: %d\r\n",_sock_fd, ret, fdSet);
#endif
// TODO
//return (ret <= 0 || !FD_ISSET(_sock_fd, &fdSet)) ? (-1) : (0);
SimpleLink Wi-Fi CC3000
Avnet Wi-Go System