![](/media/cache/profiles/266dc8d468ccd5a7def18714b2647e92.jpg.50x50_q85.jpg)
Serial RPC(Remote Procedure Call) with RTOS Support.
Dependencies: RPCInterface-rtos mbed-rpc mbed-rtos mbed
Diff: main.cpp
- Revision:
- 0:65b08d6df124
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Apr 09 18:03:39 2015 +0000 @@ -0,0 +1,25 @@ +#include "mbed.h" +#include "rtos.h" +#include "SerialRPCInterface.h" + +DigitalOut led1(LED1); +DigitalOut led2(LED2); + +void led2_thread(void const *args) +{ + while (true) { + led2 = !led2; + Thread::wait(1000); + } +} + +int main() +{ + SerialRPCInterface rpc(USBTX, USBRX); + Thread thread(led2_thread); + + while (true) { + led1 = !led1; + Thread::wait(500); + } +}