Added mutex for multiple SPI devices on the same SPI bus

Fork of cc3000_hostdriver_mbedsocket by Martin Kojtal

Revision:
12:1c2a856c618a
Parent:
11:5e3771b29385
Child:
16:f3676ae62f96
--- a/Socket/UDPSocket.cpp	Tue Oct 01 21:17:44 2013 +0000
+++ b/Socket/UDPSocket.cpp	Wed Oct 02 17:02:34 2013 +0200
@@ -59,15 +59,15 @@
         return -1;
     }
 
-//    if (!_blocking) {
-//        TimeInterval timeout(_timeout);
-//        if (wait_writable(timeout) != 0) {
-//#if (CC3000_DEBUG == 1)
-//            printf("DEBUG: The socket is not writeable. _sock_fd: %d.\n", _sock_fd);
-//#endif
-//            return 0;
-//        }
-//    }
+    if (!_blocking) {
+        TimeInterval timeout(_timeout);
+        if (wait_writable(timeout) != 0) {
+#if (CC3000_DEBUG == 1)
+            printf("DEBUG: The socket is not writeable. _sock_fd: %d.\r\n", _sock_fd);
+#endif
+            return 0;
+        }
+    }
 
     return _cc3000_module->_socket.sendto(_sock_fd, packet, length, 0, (sockaddr *)&remote._remote_host, sizeof(sockaddr));
 }