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.
Diff: apps.cpp
- Revision:
- 1:2c9d412ad471
- Parent:
- 0:7f26f0680202
--- a/apps.cpp Fri Dec 31 14:01:14 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-#include "mbed.h"
-#include "EthernetNetIf.h"
-#include "HTTPServer.h"
-
-extern EthernetNetIf eth;
-HTTPServer svr;
-LocalFileSystem fs("webfs");
-DigitalOut *leds[4];
-extern Serial viaUsb;
-
-void walking_lights() {
- leds[0] = new DigitalOut(LED1);
- leds[1] = new DigitalOut(LED2);
- leds[2] = new DigitalOut(LED3);
- leds[3] = new DigitalOut(LED4);
- int i = 0;
- while (1) {
- *leds[i] = 1;
- wait(0.2);
- *leds[i] = 0;
- i++;
- i %= 4;
- viaUsb.putc('*');
- }
-}
-
-int http_server() {
- FSHandler::mount("/webfs", "/files"); //Mount /webfs path on /files web path
- //FSHandler::mount("/webfs", "/"); //Mount /webfs path on web root path
-
- svr.addHandler<FSHandler>("/files");
-// svr.addHandler<SimpleHandler>("/"); //Default handler
- svr.bind(80);
-
- viaUsb.printf("Listening for http requests...\n");
-/*
- Timer tm;
- tm.start();
- //Listen indefinitely
- while (true) {
- Net::poll();
- if (tm.read()>.5) {
- tm.start();
- }
- }
- */
-}