f

Dependencies:   mbed

Fork of lwip by mbed unsupported

Committer:
idijoeteque
Date:
Thu Aug 03 10:24:16 2017 +0000
Revision:
1:803fdc96fbd7
Parent:
0:5e1631496985
hello

Who changed what in which revision?

UserRevisionLine numberNew contents of line
root@mbed.org 0:5e1631496985 1 #include "mbed.h"
root@mbed.org 0:5e1631496985 2 #include "HTTPServer.h"
root@mbed.org 0:5e1631496985 3 #include "HTTPRPC.h"
root@mbed.org 0:5e1631496985 4 #include "HTTPFS.h"
root@mbed.org 0:5e1631496985 5
root@mbed.org 0:5e1631496985 6 HTTPServer http;
root@mbed.org 0:5e1631496985 7 DigitalOut led1(LED1, "led1");
root@mbed.org 0:5e1631496985 8 DigitalOut led2(LED2, "led2");
root@mbed.org 0:5e1631496985 9 DigitalOut led3(LED3, "led3");
root@mbed.org 0:5e1631496985 10 DigitalOut led4(LED4, "led4");
root@mbed.org 0:5e1631496985 11 LocalFileSystem local("local");
root@mbed.org 0:5e1631496985 12
root@mbed.org 0:5e1631496985 13 int main(void) {
root@mbed.org 0:5e1631496985 14 Base::add_rpc_class<AnalogIn>();
root@mbed.org 0:5e1631496985 15 Base::add_rpc_class<AnalogOut>();
root@mbed.org 0:5e1631496985 16 Base::add_rpc_class<DigitalIn>();
root@mbed.org 0:5e1631496985 17 Base::add_rpc_class<DigitalOut>();
root@mbed.org 0:5e1631496985 18 Base::add_rpc_class<PwmOut>();
root@mbed.org 0:5e1631496985 19 Base::add_rpc_class<Timer>();
root@mbed.org 0:5e1631496985 20 Base::add_rpc_class<SPI>();
root@mbed.org 0:5e1631496985 21 Base::add_rpc_class<BusOut>();
root@mbed.org 0:5e1631496985 22 Base::add_rpc_class<BusIn>();
root@mbed.org 0:5e1631496985 23
root@mbed.org 0:5e1631496985 24 http.addHandler(new HTTPRPC());
root@mbed.org 0:5e1631496985 25 http.addHandler(new HTTPFileSystemHandler("/", "/local/"));
root@mbed.org 0:5e1631496985 26 http.bind();
root@mbed.org 0:5e1631496985 27
root@mbed.org 0:5e1631496985 28 while(1) {
root@mbed.org 0:5e1631496985 29 http.poll();
root@mbed.org 0:5e1631496985 30 }
root@mbed.org 0:5e1631496985 31 }
root@mbed.org 0:5e1631496985 32