Webserver only w/o any other functions, single thread. Running on STM32F013+W5500
Dependencies: NTPClient W5500Interface Watchdog device_configuration eeprom_flash mbed-rpc-nucleo mbed-rtos mbed
Fork of F103-Serial-to-Ethernet by
Revision 35:f5c98e2d6aad, committed 2015-02-07
- Comitter:
- olympux
- Date:
- Sat Feb 07 22:32:06 2015 +0000
- Parent:
- 34:32299b819067
- Child:
- 36:dc6f079777bb
- Commit message:
- Updated RPC names
Changed in this revision
--- a/README.md Sat Jan 31 08:45:04 2015 +0000 +++ b/README.md Sat Feb 07 22:32:06 2015 +0000 @@ -30,4 +30,9 @@ Only one network output buffer is used for RPC-style and NNIO protocols. + Modified: process RPC-style command in tcp client, similar to TCP/UDP server. + Updated: automatically reset after setting network configuration or setting TCP server for auto update mode. - + Updated: RPC object name is 16 max. \ No newline at end of file + + Updated: RPC object name is 16 max. + +v1.1.1 (07/02/2015) +-------------- + ++ Updated RPC names \ No newline at end of file
--- a/main.cpp Sat Jan 31 08:45:04 2015 +0000 +++ b/main.cpp Sat Feb 07 22:32:06 2015 +0000 @@ -120,14 +120,14 @@ * Use the RPC enabled wrapped class - see RpcClasses.h for more info */ // DigitalIn -RpcDigitalIn di0(PB_14, "din0"); -RpcDigitalIn di1(PB_12, "din1"); -RpcDigitalIn di2(PB_10, "din2"); -RpcDigitalIn di3(PB_1, "din3"); -RpcDigitalIn di4(PB_15, "din4"); -RpcDigitalIn di5(PB_13, "din5"); -RpcDigitalIn di6(PB_11, "din6"); -RpcDigitalIn di7(PB_2, "din7"); +RpcDigitalIn di0(PB_14, "di0"); +RpcDigitalIn di1(PB_12, "di1"); +RpcDigitalIn di2(PB_10, "di2"); +RpcDigitalIn di3(PB_1, "di3"); +RpcDigitalIn di4(PB_15, "di4"); +RpcDigitalIn di5(PB_13, "di5"); +RpcDigitalIn di6(PB_11, "di6"); +RpcDigitalIn di7(PB_2, "di7"); DigitalIn din0(PB_14); DigitalIn din1(PB_12); DigitalIn din2(PB_10); @@ -137,14 +137,14 @@ DigitalIn din6(PB_11); DigitalIn din7(PB_2); // DigitalOut -RpcDigitalOut do0(PB_3, "dout0"); -RpcDigitalOut do1(PB_5, "dout1"); -RpcDigitalOut do2(PB_7, "dout2"); -RpcDigitalOut do3(PB_9, "dout3"); -RpcDigitalOut do4(PD_2, "dout4"); -RpcDigitalOut do5(PB_4, "dout5"); -RpcDigitalOut do6(PB_6, "dout6"); -RpcDigitalOut do7(PB_8, "dout7"); +RpcDigitalOut do0(PB_3, "do0"); +RpcDigitalOut do1(PB_5, "do1"); +RpcDigitalOut do2(PB_7, "do2"); +RpcDigitalOut do3(PB_9, "do3"); +RpcDigitalOut do4(PD_2, "do4"); +RpcDigitalOut do5(PB_4, "do5"); +RpcDigitalOut do6(PB_6, "do6"); +RpcDigitalOut do7(PB_8, "do7"); DigitalOut dout0(PB_3); DigitalOut dout1(PB_5); DigitalOut dout2(PB_7); @@ -154,8 +154,8 @@ DigitalOut dout6(PB_6); DigitalOut dout7(PB_8); // AnalogIn -RpcAnalogIn adc10(PC_0, "ain0"); // adc10 -RpcAnalogIn adc11(PC_1, "ain1"); // adc11 +RpcAnalogIn adc10(PC_0, "ai0"); // adc10 +RpcAnalogIn adc11(PC_1, "ai1"); // adc11 AnalogIn ain0(PC_0); AnalogIn ain1(PC_1); // AnalogOut, PWM @@ -165,7 +165,7 @@ RpcSerial usart2(USBTX, USBRX, "uart"); // usart2 Serial uart(USBTX,USBRX); // Timer -RpcTimer timer1("timer1"); +RpcTimer timer1("tmr1"); // Watchdog Watchdog wdt;
--- a/protocol_rpc.txt Sat Jan 31 08:45:04 2015 +0000 +++ b/protocol_rpc.txt Sat Feb 07 22:32:06 2015 +0000 @@ -6,20 +6,20 @@ + TCP port: 10000 (NNIO module is TCP server) 2. Digital inputs - + Digital inputs: din0 - din7 - + Commands: /din0/read x + + Digital inputs: di0 - di7 + + Commands: /di0/read x 3. Digital outputs - + Digital outputs: dout0 - dout7 + + Digital outputs: do0 - do7 + Commands: - /dout0/read x - /dout0/write 1 + /do0/read x + /do0/write 1 3. Analog inputs - + Analog inputs: ain0 - ain1 + + Analog inputs: ai0 - ai1 + Commands: - /ain0/read x: returns a value between 0 to 1 - /ain0/read_u16 x: returns a value between 0 to 0xFFFF + /ai0/read x: returns a value between 0 to 1 + /ai0/read_u16 x: returns a value between 0 to 0xFFFF 4. PWM outputs: + PWM outputs: pwm0 - pwm1 @@ -34,12 +34,12 @@ 5. Timers: + Timer: timer1 + Commands: - /timer1/start x - /timer1/stop x - /timer1/reset x - /timer1/read x: returns float, between 0 to 1. - /timer1/read_ms - /timer1/read_us + /tmr1/start x + /tmr1/stop x + /tmr1/reset x + /tmr1/read x: returns float, between 0 to 1. + /tmr1/read_ms + /tmr1/read_us 6. UARTs: + Uart: uart