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
Revision 3:f97cdf75512e, committed 2013-10-08
- Comitter:
- Kojto
- Date:
- Tue Oct 08 15:18:03 2013 +0000
- Parent:
- 2:c8cd9df34be9
- Child:
- 4:51ad2e8bedb9
- 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 Thu Oct 03 17:43:50 2013 +0200 +++ b/cc3000_hostdriver_mbedsocket.lib Tue Oct 08 15:18:03 2013 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/Kojto/code/cc3000_hostdriver_mbedsocket/#30b6ed7bf8fd +http://mbed.org/users/Kojto/code/cc3000_hostdriver_mbedsocket/#9dd909fb7caf
--- 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");
}