tcp client for cc3000, using mbed socket interface

Dependencies:   NVIC_set_all_priorities cc3000_hostdriver_mbedsocket mbed

Revision:
3:f97cdf75512e
Parent:
2:c8cd9df34be9
Child:
4:51ad2e8bedb9
--- a/main.cpp	Thu Oct 03 17:43:50 2013 +0200
+++ b/main.cpp	Tue Oct 08 15:18:03 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,12 +102,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");
 }
 
 /**
- *  \brief Websocket demo
- *  \param  none
+ *  \brief TCP client demo
+ *  \param none
  *  \return int
  */
 int main() {
@@ -115,7 +115,7 @@
     pc.baud(115200);
 
     wifi.start(0);
-    printf("CC3000 tcp client demo.\n");
+    printf("CC3000 tcp client demo. \r\n");
     print_cc3000_info();
 
     printf("Attempting SSID Connection. \r\n");
@@ -155,7 +155,7 @@
     
      TCPSocketConnection socket;
      while (socket.connect(ECHO_SERVER_ADDRESS, ECHO_SERVER_PORT) < 0) {
-         printf("Unable to connect to (%s) on port (%d)\n", ECHO_SERVER_ADDRESS, ECHO_SERVER_PORT);
+         printf("Unable to connect to (%s) on port (%d) \r\n", ECHO_SERVER_ADDRESS, ECHO_SERVER_PORT);
          wait(1);
      }
      
@@ -168,6 +168,6 @@
      printf("%s", buf);
      
      socket.close();
-     printf("Completed.\n");
+     printf("Completed. \r\n");
 
 }