Rolf Meyer
/
SDServerDemo
A simple demo how to use the HTTPServer with an SDCard file system
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 #include "SDFileSystem.h" 00003 #include "HTTPServer.h" 00004 00005 HTTPServer http; 00006 LocalFileSystem local("local"); 00007 SDFileSystem sd(p5, p6, p7, p13, "sd"); 00008 00009 int main(void) { 00010 http.addHandler(new HTTPRPC()); 00011 http.addHandler(new HTTPFileSystemHandler("/", "/local/")); 00012 http.addHandler(new HTTPFileSystemHandler("/sdcard", "/sd/")); 00013 http.bind(); 00014 00015 while(1) { 00016 http.poll(); 00017 } 00018 }
Generated on Thu Aug 4 2022 19:26:57 by 1.7.2