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
protocol_rpc.txt@34:32299b819067, 2015-01-31 (annotated)
- Committer:
- olympux
- Date:
- Sat Jan 31 08:45:04 2015 +0000
- Revision:
- 34:32299b819067
- Parent:
- 27:22f289beceb8
- Child:
- 35:f5c98e2d6aad
Improvements
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
olympux | 27:22f289beceb8 | 1 | NNIO module can be controlled through TCP/UDP using RPC commands. |
olympux | 27:22f289beceb8 | 2 | |
olympux | 27:22f289beceb8 | 3 | |
olympux | 27:22f289beceb8 | 4 | 1. Connections |
olympux | 27:22f289beceb8 | 5 | + UDP port: 11000 |
olympux | 27:22f289beceb8 | 6 | + TCP port: 10000 (NNIO module is TCP server) |
olympux | 27:22f289beceb8 | 7 | |
olympux | 27:22f289beceb8 | 8 | 2. Digital inputs |
olympux | 27:22f289beceb8 | 9 | + Digital inputs: din0 - din7 |
olympux | 27:22f289beceb8 | 10 | + Commands: /din0/read x |
olympux | 27:22f289beceb8 | 11 | |
olympux | 27:22f289beceb8 | 12 | 3. Digital outputs |
olympux | 27:22f289beceb8 | 13 | + Digital outputs: dout0 - dout7 |
olympux | 27:22f289beceb8 | 14 | + Commands: |
olympux | 27:22f289beceb8 | 15 | /dout0/read x |
olympux | 27:22f289beceb8 | 16 | /dout0/write 1 |
olympux | 27:22f289beceb8 | 17 | |
olympux | 27:22f289beceb8 | 18 | 3. Analog inputs |
olympux | 27:22f289beceb8 | 19 | + Analog inputs: ain0 - ain1 |
olympux | 27:22f289beceb8 | 20 | + Commands: |
olympux | 27:22f289beceb8 | 21 | /ain0/read x: returns a value between 0 to 1 |
olympux | 27:22f289beceb8 | 22 | /ain0/read_u16 x: returns a value between 0 to 0xFFFF |
olympux | 27:22f289beceb8 | 23 | |
olympux | 27:22f289beceb8 | 24 | 4. PWM outputs: |
olympux | 27:22f289beceb8 | 25 | + PWM outputs: pwm0 - pwm1 |
olympux | 27:22f289beceb8 | 26 | + Commands: |
olympux | 27:22f289beceb8 | 27 | /pwm/period 0.5: Set the PWM period, specified in seconds (float), keeping the duty cycle the same. |
olympux | 27:22f289beceb8 | 28 | /pwm/period_ms 500: Set the PWM period, specified in milli-seconds (int), keeping the duty cycle the same. |
olympux | 27:22f289beceb8 | 29 | /pwm/pulsewidth 1: Set the PWM pulsewidth, specified in seconds (float), keeping the period the same. |
olympux | 27:22f289beceb8 | 30 | /pwm/pulsewidth_ms 1000: Set the PWM pulsewidth, specified in milli-seconds (int), keeping the period the same. |
olympux | 27:22f289beceb8 | 31 | /pwm/read x: Return the current output duty-cycle setting, measured as a percentage (float). |
olympux | 27:22f289beceb8 | 32 | /pwm/write 0.6: Set the ouput duty-cycle, specified as a percentage (float). |
olympux | 27:22f289beceb8 | 33 | |
olympux | 27:22f289beceb8 | 34 | 5. Timers: |
olympux | 27:22f289beceb8 | 35 | + Timer: timer1 |
olympux | 27:22f289beceb8 | 36 | + Commands: |
olympux | 27:22f289beceb8 | 37 | /timer1/start x |
olympux | 27:22f289beceb8 | 38 | /timer1/stop x |
olympux | 27:22f289beceb8 | 39 | /timer1/reset x |
olympux | 27:22f289beceb8 | 40 | /timer1/read x: returns float, between 0 to 1. |
olympux | 27:22f289beceb8 | 41 | /timer1/read_ms |
olympux | 27:22f289beceb8 | 42 | /timer1/read_us |
olympux | 27:22f289beceb8 | 43 | |
olympux | 27:22f289beceb8 | 44 | 6. UARTs: |
olympux | 27:22f289beceb8 | 45 | + Uart: uart |
olympux | 27:22f289beceb8 | 46 | + Commands: |
olympux | 27:22f289beceb8 | 47 | /uart/baud 9600 |
olympux | 27:22f289beceb8 | 48 | /uart/putc 60: send ASCII code, '<' |
olympux | 27:22f289beceb8 | 49 | /uart/getc x: return ASCII code |
olympux | 27:22f289beceb8 | 50 | /uart/puts helloworld: print helloworld to serial port |