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: mbed-rtos EthernetInterface FatFileSystemCpp MCP23S17 SDFileSystem mbed
Fork of HTTPServerHelloWorld by
Diff: HTTPServerHelloWorld.cpp
- Revision:
- 3:5dc0023e6284
- Parent:
- 2:bd69e4df7955
- Child:
- 4:a19825caaf41
--- a/HTTPServerHelloWorld.cpp Fri Jul 09 14:46:34 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-#include "mbed.h"
-#include "EthernetNetIf.h"
-#include "HTTPServer.h"
-
-EthernetNetIf eth;
-HTTPServer svr;
-
-DigitalOut led1(LED1);
-
-int main() {
- printf("Setting up...\n");
- EthernetErr ethErr = eth.setup();
- if(ethErr)
- {
- printf("Error %d in setup.\n", ethErr);
- return -1;
- }
- printf("Setup OK\n");
-
- svr.addHandler<SimpleHandler>("/"); //Default handler
- svr.bind(80);
-
- printf("Listening...\n");
-
- Timer tm;
- tm.start();
- //Listen indefinitely
- while(true)
- {
- Net::poll();
- if(tm.read()>.5)
- {
- led1=!led1; //Show that we are alive
- tm.start();
- }
- }
-
- return 0;
-}
