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.
Dependencies: NVIC_set_all_priorities cc3000_hostdriver_mbedsocket mbed
Fork of cc3000_ping_demo by
Diff: main.cpp
- Revision:
- 5:864a193bd778
- Parent:
- 4:52e1684bf322
- Child:
- 7:fbc17364ea63
--- a/main.cpp Thu Oct 03 16:06:37 2013 +0000
+++ b/main.cpp Tue Oct 08 15:12:24 2013 +0000
@@ -66,11 +66,11 @@
* \return none
*/
void connect_to_ssid(char *ssid, char *key, unsigned char sec_mode) {
- printf("Connecting to SSID: %s. Timeout is 10s.\n",ssid);
+ printf("Connecting to SSID: %s. Timeout is 10s. \r\n",ssid);
if (wifi.connect_to_AP((uint8_t *)ssid, (uint8_t *)key, sec_mode) == true) {
- printf(" Connected\n");
+ printf(" Connected. \r\n");
} else {
- printf(" Connection timed-out (error). Please restart.\n");
+ printf(" Connection timed-out (error). Please restart. \r\n");
while(1);
}
}
@@ -99,11 +99,12 @@
user_info.FTC = 1;
wifi.set_user_file_info((uint8_t *)&user_info, sizeof(user_info));
wifi._wlan.stop();
- printf("FTC finished.\n");
+ printf("FTC finished. \r\n");
}
-/** Ping a site
- * \param none
+/**
+ * \brief Ping a site
+ * \param none
* \return int
*/
int main() {
@@ -156,7 +157,7 @@
uint8_t add3 = (ip >> 0);
printf("IP address of %s: %d:%d:%d:%d \r\n", site, add0, add1, add2, add3);
} else {
- printf("Failed");
+ printf("Failed. \r\n");
}
printf("Starting sending ping. \r\n");
