
An example HTTP Server using new Ethernet Interface and localfilesystem.
Dependencies: EthernetInterface HttpServer mbed-rpc mbed-rtos mbed
Fork of giken9_HTMLServer_Sample by
Revision 5:d98cf6df5187, committed 2014-12-23
- Comitter:
- mkilivan
- Date:
- Tue Dec 23 19:38:53 2014 +0000
- Parent:
- 4:28e8af6595f7
- Child:
- 6:116ca781e161
- Commit message:
- Removed lcd library and code tidy up
Changed in this revision
C12832.lib | Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/C12832.lib Tue Dec 23 19:25:03 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://developer.mbed.org/users/chris/code/C12832/#7de323fa46fe
--- a/main.cpp Tue Dec 23 19:25:03 2014 +0000 +++ b/main.cpp Tue Dec 23 19:38:53 2014 +0000 @@ -4,15 +4,10 @@ #include "EthernetInterface.h" #include "HTTPServer.h" #include "mbed_rpc.h" -#include "C12832.h" - - -C12832 lcd(p5, p7, p6, p8, p11); EthernetInterface eth; LocalFileSystem local("local"); DigitalOut led4(LED4); -//DigitalOut led1(LED1); void LcdWrite(Arguments* arg, Reply* r);void LcdWrite(Arguments* arg, Reply* r); void aliveState(void const *args) @@ -26,8 +21,6 @@ { printf("********* PROGRAM START ***********\r\n"); Thread thread(aliveState); - lcd.cls(); - lcd.locate(0,0); printf("********* RPC Initialize ***********\r\n"); RPC::add_rpc_class<RpcDigitalOut>(); @@ -38,7 +31,6 @@ printf("EthernetInterface Setting up...\r\n"); if(eth.init()!=0) { //for DHCP Server - // if(eth.init("133.11.168.23","255.255.255.0","133.11.168.1")!=0) { //for Static IP Address printf("EthernetInterface Initialize Error \r\n"); return -1; } @@ -52,16 +44,6 @@ printf("Ethernet Setup OK\r\n"); FSHandler::mount("/local","/"); - //FSHandler::mount("/local/css","css/"); - lcd.locate(0,0); - lcd.printf("%s",eth.getIPAddress()); HTTPServerStart(80); } - -void LcdWrite(Arguments* arg, Reply* r) //RPC Call -{ - lcd.locate(0,1); - lcd.printf("%s",arg->argv[0]); -} -