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: EthernetInterface Server TCPDebug mbed-rtos mbed
Fork of ThreadServer by
Diff: main.cpp
- Revision:
- 0:fe887190dddb
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Jun 13 20:01:19 2013 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+#include "EthernetInterface.h"
+#include "Server.h"
+#include "Debug.h"
+
+int main (void) {
+ EthernetInterface eth;
+ eth.init(); //Use DHCP
+ eth.connect();
+
+ int server_port=7;
+ int debug_port=8;
+
+ initDebug(); //initialize Debug server
+ startDebug(debug_port); //start the Debug server
+ while(!isDebugConnected()) //do nothing until a debug client is connected (optional)
+ {
+ wait(0.5);
+ }
+
+ startServer(server_port); //start server
+
+
+ /* do your thing*/
+
+}
\ No newline at end of file
