cc3000 udp client demo
Dependencies: NVIC_set_all_priorities cc3000_hostdriver_mbedsocket mbed
Revision 2:72ff0379d7b5, committed 2013-10-08
- Comitter:
- Kojto
- Date:
- Tue Oct 08 14:56:50 2013 +0000
- Parent:
- 1:d9c04472edaf
- Child:
- 3:2941c1b5d79e
- Commit message:
- Update host driver to rev 35
Changed in this revision
| cc3000_hostdriver_mbedsocket.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/cc3000_hostdriver_mbedsocket.lib Sun Oct 06 12:58:16 2013 +0200 +++ b/cc3000_hostdriver_mbedsocket.lib Tue Oct 08 14:56:50 2013 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/Kojto/code/cc3000_hostdriver_mbedsocket/#8c7cc1c76ff8 +http://mbed.org/users/Kojto/code/cc3000_hostdriver_mbedsocket/#9dd909fb7caf
--- 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");
}