Added mutex for multiple SPI devices on the same SPI bus

Fork of cc3000_hostdriver_mbedsocket by Martin Kojtal

Revision:
9:4d12b82bc767
Parent:
8:4c42ca37ba33
Child:
11:5e3771b29385
diff -r 4c42ca37ba33 -r 4d12b82bc767 Socket/Endpoint.cpp
--- a/Socket/Endpoint.cpp	Mon Sep 30 19:29:06 2013 +0000
+++ b/Socket/Endpoint.cpp	Tue Oct 01 04:31:56 2013 +0000
@@ -95,11 +95,11 @@
         uint32_t address_integer;
         _cc3000_module->_socket.get_host_by_name((uint8_t *)host, strlen(host) , &address_integer);
 
-                uint32_t ip = 0; 
-                ip = (ip | (address_integer >> 24));
-                ip = (ip | ((address_integer & 0x00FF0000) >> 8));
-                ip = (ip | ((address_integer & 0x0000FF00) << 8));
-                ip = (ip | ((address_integer & 0x000000FF) << 24));
+        uint32_t ip = 0;
+        ip = (ip | (address_integer >> 24));
+        ip = (ip | ((address_integer & 0x00FF0000) >> 8));
+        ip = (ip | ((address_integer & 0x0000FF00) << 8));
+        ip = (ip | ((address_integer & 0x000000FF) << 24));
         _remote_host.sin_addr.s_addr = ip;
         inet_ntoa_r(_remote_host.sin_addr, _ipAddress, sizeof(_ipAddress));
     } else {