cc3000 hostdriver with the mbed socket interface

Dependents:   cc3000_hello_world_demo cc3000_simple_socket_demo cc3000_ntp_demo cc3000_ping_demo ... more

Revision:
37:3332f57b7f1e
Parent:
36:1f70a62a160e
Child:
40:acb9324640c4
--- a/cc3000.cpp	Wed Oct 09 20:18:40 2013 +0200
+++ b/cc3000.cpp	Sat Oct 12 14:27:46 2013 +0200
@@ -302,7 +302,7 @@
 }
 
 uint32_t cc3000::ping(uint32_t ip, uint8_t attempts, uint16_t timeout, uint8_t size) {
-    uint32_t reversed_ip = (ip >> 24) | (ip >> 8) & 0xFF00 | (ip << 8) & 0xFF0000 | (ip << 24);
+    uint32_t reversed_ip = (ip >> 24) | ((ip >> 8) & 0xFF00) | ((ip << 8) & 0xFF0000) | (ip << 24);
 
     _ping_report.packets_received = 0;
     if (_netapp.ping_send(&reversed_ip, attempts, size, timeout) == -1) {