MiMic WebServer port to LPC1768-Mini-DK2 (Alpha ver.) *On uVision4(MDK-STD), -O2 option is required to run.
Dependencies: NySDFileSystem libMiMic mbed-rtos mbed
Fork of MbedFileServer by
Revision 12:e642e14ecb21, committed 2013-07-11
- Comitter:
- mio
- Date:
- Thu Jul 11 14:46:27 2013 +0000
- Parent:
- 11:5c1608e46104
- Commit message:
- Following Original Code Update.
Changed in this revision
diff -r 5c1608e46104 -r e642e14ecb21 libMiMic.lib --- a/libMiMic.lib Sun May 12 03:24:59 2013 +0000 +++ b/libMiMic.lib Thu Jul 11 14:46:27 2013 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/nyatla/code/libMiMic/#87fecac39b9f +http://mbed.org/users/nyatla/code/libMiMic/#61edfd4b16ee
diff -r 5c1608e46104 -r e642e14ecb21 main.cpp --- a/main.cpp Sun May 12 03:24:59 2013 +0000 +++ b/main.cpp Thu Jul 11 14:46:27 2013 +0000 @@ -1,11 +1,12 @@ /** - * MbedFilrServer , LPC1768-MiniDK2 Port + * MbedFileServer , LPC1768-MiniDK2 Port * - * https://mbed.org/users/nyatla/code/libMiMic/ + * See: + * https://mbed.org/users/nyatla/code/libMiMic/ + * http://nyatla.jp/mimic/wp/ * - * *On CodeRed(LPCXpresso) to build, - * Must Add -DTOOLCHAIN_CR_ARM project setting of C++ Compiler for "WORDS_STACK_SIZE" in cmsis_os.h - * Must create your own mbed-rtos/rtx/LPC1768/HAL_CM3.c routine on RTX + * 2013.7.11 : Following original update. + * */ #include "mbed.h" @@ -39,7 +40,7 @@ ModUrl modurl; //basic URL parser ModLocalFileSystem modsd; public: - FsHttpd():Httpd(80) + FsHttpd(NetConfig& i_cfg):Httpd(i_cfg._inst.services.http_port) { //bind local file system path to /local/* modsd.setParam("sd"); @@ -84,23 +85,25 @@ } }; +NetConfig cfg; //create network configulation int main() { - NetConfig cfg; //create network configulation - Net net(cfg); //create a net instance. + Net net; //create a net instance. pc.baud(9600) ; // serial port for debug //try to override setting by SD file. if (cfg.loadFromFile("/sd/mimic.cfg")) { pc.printf("Setting is Overridden by /sd/mimic.cfg\r\n") ; } else { - pc.printf("MY ADDR is 192.168.1.240\r\n") ; - cfg.setIpAddr(192,168,1,240) ; - cfg.setGateway(192,168,1,255) ; + pc.printf("MY ADDR is 192.168.1.239\r\n") ; + cfg.setEmac(0x1,0x2,0x3,0x4,0x5,0x6); + cfg.setIpAddr(192,168,1,239) ; + cfg.setGateway(192,168,1,1) ; cfg.setNetMask(255,255,255,0) ; } - FsHttpd httpd; //create a httpd instance. + FsHttpd httpd(cfg); //create a httpd instance. + net.start(cfg); httpd.loop(); //start httpd loop. return 0; }
diff -r 5c1608e46104 -r e642e14ecb21 mbed-rtos.lib --- a/mbed-rtos.lib Sun May 12 03:24:59 2013 +0000 +++ b/mbed-rtos.lib Thu Jul 11 14:46:27 2013 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed-rtos/#db1fc233faa9 +http://mbed.org/users/mbed_official/code/mbed-rtos/#58b30ac3f00e