Added mutex for multiple SPI devices on the same SPI bus

Fork of cc3000_hostdriver_mbedsocket by Martin Kojtal

Revision:
28:8c7cc1c76ff8
Parent:
13:5e36c267e62f
--- a/Socket/TCPSocketConnection.cpp	Fri Oct 04 07:06:29 2013 +0000
+++ b/Socket/TCPSocketConnection.cpp	Sat Oct 05 20:29:39 2013 +0200
@@ -112,7 +112,11 @@
     }
 
     int n = _cc3000_module->_socket.recv(_sock_fd, data, length, 0);
-    _is_connected = (n != 0);
+    if (n >= 0) {
+        _is_connected = 1;
+    } else {
+        _is_connected = 0;
+    }
 
     return n;
 }