cc3000 hostdriver with the mbed socket interface

Dependents:   cc3000_hello_world_demo cc3000_simple_socket_demo cc3000_ntp_demo cc3000_ping_demo ... more

Revision:
13:5e36c267e62f
Parent:
11:5e3771b29385
Child:
28:8c7cc1c76ff8
--- a/Socket/TCPSocketConnection.cpp	Tue Oct 01 21:17:44 2013 +0000
+++ b/Socket/TCPSocketConnection.cpp	Wed Oct 02 15:00:07 2013 +0000
@@ -28,23 +28,17 @@
 
 int TCPSocketConnection::connect(const char *host, const int port) {
     if (init_socket(SOCK_STREAM, IPPROTO_TCP) < 0) {
-#if (CC3000_DEBUG == 1)
-        printf("DEBUG: Failed to create tcp socket.\r\n");
-#endif
+        DBG_SOCKET("Failed to create tcp socket");
         return -1;
     }
 
     if (set_address(host, port) != 0) {
-#if (CC3000_DEBUG == 1)
-        printf("DEBUG: Failed to set address (tcp).\r\n");
-#endif
+        DBG_SOCKET("Failed to set address (tcp)");
         return -1;
     }
 
     if (_cc3000_module->_socket.connect(_sock_fd, (const sockaddr *)&_remote_host, sizeof(_remote_host)) < 0) {
-#if (CC3000_DEBUG == 1)
-        printf("DEBUG: Failed to connect (tcp).\r\n");
-#endif
+        DBG_SOCKET("Failed to connect (tcp)");
         close();
         return -1;
     }