cc3000 udp client demo
Dependencies: NVIC_set_all_priorities cc3000_hostdriver_mbedsocket mbed
Diff: main.cpp
- Revision:
- 2:72ff0379d7b5
- Parent:
- 1:d9c04472edaf
- Child:
- 3:2941c1b5d79e
--- a/main.cpp Sun Oct 06 12:58:16 2013 +0200 +++ b/main.cpp Tue Oct 08 14:56:50 2013 +0000 @@ -68,11 +68,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); } } @@ -105,7 +105,7 @@ } /** - * \brief Websocket demo + * \brief Upd client demo * \param none * \return int */ @@ -114,7 +114,7 @@ pc.baud(115200); wifi.start(0); - printf("CC3000 tcp client demo.\n"); + printf("CC3000 udp client demo.\r\n"); print_cc3000_info(); printf("Attempting SSID Connection. \r\n"); @@ -165,9 +165,9 @@ int n = sock.receiveFrom(echo_server, in_buffer, sizeof(in_buffer)); in_buffer[n] = '\0'; - printf("%s\n", in_buffer); + printf("%s \r\n", in_buffer); sock.close(); - printf("Completed.\n"); + printf("Completed. \r\n"); }