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
Diff: main.cpp
- Revision:
- 4:9d543391017c
- Parent:
- 3:3f53082b16ec
- Child:
- 5:ba0af4c6f21e
--- a/main.cpp Thu Oct 03 17:51:34 2013 +0200
+++ b/main.cpp Tue Oct 08 15:15:27 2013 +0000
@@ -69,11 +69,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);
}
}
@@ -102,7 +102,7 @@
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");
}
/**
@@ -115,7 +115,7 @@
pc.baud(115200);
wifi.start(0);
- printf("CC3000 tcp server demo.\n");
+ printf("CC3000 tcp server demo.\r\n");
print_cc3000_info();
printf("Attempting SSID Connection. \r\n");
@@ -157,7 +157,7 @@
server.listen();
while (true) {
- printf("\nWait for new connection...\r\n");
+ printf("\r\nWait for new connection...\r\n");
TCPSocketConnection client;
server.accept(client);
client.set_blocking(false, 1500); // Timeout after (1.5)s