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
main.cpp
- Committer:
- lemniskata
- Date:
- 2013-06-13
- Revision:
- 1:7f1fe0784e7e
- Parent:
- 0:fe887190dddb
File content as of revision 1:7f1fe0784e7e:
#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*/
}
