
An example HTTP Server using new Ethernet Interface and localfilesystem.
Dependencies: EthernetInterface HttpServer mbed-rpc mbed-rtos mbed
Fork of giken9_HTMLServer_Sample by
Diff: main.cpp
- Revision:
- 5:d98cf6df5187
- Parent:
- 3:f0c16cc3a4ef
- Child:
- 6:116ca781e161
--- 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]); -} -