Rolf Meyer
/
SDServerDemo
A simple demo how to use the HTTPServer with an SDCard file system
Diff: main.cpp
- Revision:
- 0:949146458785
diff -r 000000000000 -r 949146458785 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Nov 20 11:25:04 2009 +0000 @@ -0,0 +1,18 @@ +#include "mbed.h" +#include "SDFileSystem.h" +#include "HTTPServer.h" + +HTTPServer http; +LocalFileSystem local("local"); +SDFileSystem sd(p5, p6, p7, p13, "sd"); + +int main(void) { + http.addHandler(new HTTPRPC()); + http.addHandler(new HTTPFileSystemHandler("/", "/local/")); + http.addHandler(new HTTPFileSystemHandler("/sdcard", "/sd/")); + http.bind(); + + while(1) { + http.poll(); + } +}