HTTP Server based on Rolf Meyers work

Dependencies:   mbed lwip

Files at this revision

API Documentation at this revision

Comitter:
chris
Date:
Thu May 13 15:09:04 2010 +0000
Commit message:

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
precomp.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 27247b1ce338 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu May 13 15:09:04 2010 +0000
@@ -0,0 +1,32 @@
+#include "mbed.h"
+#include "HTTPServer.h"
+#include "HTTPRPC.h"
+#include "HTTPFS.h"
+
+HTTPServer http;
+DigitalOut led1(LED1, "led1");
+DigitalOut led2(LED2, "led2");
+DigitalOut led3(LED3, "led3");
+DigitalOut led4(LED4, "led4");
+LocalFileSystem local("local");
+
+int main(void) {
+    Base::add_rpc_class<AnalogIn>();
+    Base::add_rpc_class<AnalogOut>();
+    Base::add_rpc_class<DigitalIn>();
+    Base::add_rpc_class<DigitalOut>();
+    Base::add_rpc_class<PwmOut>();
+    Base::add_rpc_class<Timer>();
+    Base::add_rpc_class<SPI>();
+    Base::add_rpc_class<BusOut>();
+    Base::add_rpc_class<BusIn>();
+
+    http.addHandler(new HTTPRPC());
+    http.addHandler(new HTTPFileSystemHandler("/", "/local/"));
+    http.bind();
+
+    while(1) {
+        http.poll();
+    }
+}
+
diff -r 000000000000 -r 27247b1ce338 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu May 13 15:09:04 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/f63353af7be8
diff -r 000000000000 -r 27247b1ce338 precomp.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/precomp.lib	Thu May 13 15:09:04 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_unsupported/code/lwip/
\ No newline at end of file