Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of cc3000_hostdriver_mbedsocket by
Diff: cc3000.cpp
- Revision:
- 14:28c8bbbea025
- Parent:
- 13:5e36c267e62f
- Child:
- 16:f3676ae62f96
--- a/cc3000.cpp Wed Oct 02 15:00:07 2013 +0000
+++ b/cc3000.cpp Wed Oct 02 15:26:41 2013 +0000
@@ -133,7 +133,7 @@
// Start the Smart Config process with AES disabled
_wlan.smart_config_start(0);
- DBG_HCI("Waiting for smartconfig to be completed");
+ DBG_CC("Waiting for smartconfig to be completed");
// Wait for Smart config finished
while (_status.smart_config_complete == 0)
@@ -142,7 +142,7 @@
}
- DBG_HCI("Smartconfig finished");
+ DBG_CC("Smartconfig finished");
#ifndef CC3000_UNENCRYPTED_SMART_CONFIG
// create new entry for AES encryption key
@@ -205,7 +205,7 @@
if (t.read_ms() > 10000){
ret = false;
- DBG_HCI("Connection to AP failed");
+ DBG_CC("Connection to AP failed");
break;
}
@@ -288,7 +288,7 @@
tcp_socket = _socket.socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (tcp_socket == -1) {
- DBG_HCI("Failed to create new socket (tcp)");
+ DBG_CC("Failed to create new socket (tcp)");
return cc3000_client(*this);
}
@@ -301,7 +301,7 @@
socket_address.data[5] = ip_address;
if (_socket.connect(tcp_socket, &socket_address, sizeof(socket_address)) == -1) {
- DBG_HCI("Failed to connect (tcp)");
+ DBG_CC("Failed to connect (tcp)");
_socket.closesocket(tcp_socket);
return cc3000_client(*this);
}
@@ -314,7 +314,7 @@
udp_socket = _socket.socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
if (udp_socket == -1) {
- DBG_HCI("Failed to create new socket (udp)");
+ DBG_CC("Failed to create new socket (udp)");
return cc3000_client(*this);
}
@@ -327,7 +327,7 @@
socket_address.data[5] = ip_address;
if (_socket.connect(udp_socket, &socket_address, sizeof(socket_address)) == -1) {
- DBG_HCI("Failed to connect (udp)");
+ DBG_CC("Failed to connect (udp)");
_socket.closesocket(udp_socket);
return cc3000_client(*this);
}
@@ -341,7 +341,7 @@
tcp_socket = _socket.socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (tcp_socket == -1) {
- DBG_HCI("Failed to create new socket.");
+ DBG_CC("Failed to create new socket.");
return cc3000_server(*this, socket_address);
}
@@ -354,11 +354,11 @@
socket_address.data[5] = ip_address;
if (_socket.bind(tcp_socket, &socket_address, sizeof(socket_address)) != 0) {
- DBG_HCI("Failed to bind the new socket");
+ DBG_CC("Failed to bind the new socket");
return cc3000_server(*this, socket_address);
}
if (_socket.listen(tcp_socket, 1) != 0) { /* 1 client */
- DBG_HCI("Failed to listen on the new socket");
+ DBG_CC("Failed to listen on the new socket");
return cc3000_server(*this, socket_address);
}
@@ -393,18 +393,18 @@
_ping_report.packets_received = 0;
if (_netapp.ping_send(&reversed_ip, attempts, size, timeout) == -1) {
- DBG_HCI("Failed to send ping");
+ DBG_CC("Failed to send ping");
return 0;
}
wait_ms(timeout*attempts*2);
/* known issue of cc3000 - sent number is send + received */
// TODO : Remove the Sent/recv'd counts until ti fix the firmware issue?
- DBG_HCI("Sent: %d \r\n",_ping_report.packets_sent);
- DBG_HCI("Received: %d \r\n",_ping_report.packets_received);
- DBG_HCI("Min time: %d \r\n",_ping_report.min_round_time);
- DBG_HCI("Max time: %d \r\n",_ping_report.max_round_time);
- DBG_HCI("Avg time: %d \r\n",_ping_report.avg_round_time);
+ DBG_CC("Sent: %d",_ping_report.packets_sent);
+ DBG_CC("Received: %d",_ping_report.packets_received);
+ DBG_CC("Min time: %d",_ping_report.min_round_time);
+ DBG_CC("Max time: %d",_ping_report.max_round_time);
+ DBG_CC("Avg time: %d",_ping_report.avg_round_time);
return _ping_report.packets_received;
}
