cc3000 hostdriver with the mbed socket interface

Dependents:   cc3000_hello_world_demo cc3000_simple_socket_demo cc3000_ntp_demo cc3000_ping_demo ... more

Files at this revision

API Documentation at this revision

Comitter:
Kojto
Date:
Tue Oct 01 04:31:56 2013 +0000
Parent:
8:4c42ca37ba33
Child:
10:7069c5f1e6f4
Commit message:
socket set to -1 (closing)

Changed in this revision

Socket/Endpoint.cpp Show annotated file Show diff for this revision Revisions of this file
--- 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 {