Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: DAQ mbed-rtos mbed
Diff: main.cpp
- Revision:
- 0:6ee88b4152dc
- Child:
- 1:fa51edf89e71
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Apr 23 11:10:26 2014 +0000 @@ -0,0 +1,42 @@ +#include "mbed.h" +#include "Module.h" +#include "rtos.h" + +DigitalOut led1(LED1); +DigitalOut led2(LED2); +DigitalOut led3(LED3); + +Module *m; + +void uartThread(void const *args) +{ + while(1) + { + led2 =! led2; + m->getUart()->uart_thread(); + wait(0.1); + } +} + +void meet(void const *) +{ + led3 =! led3; + m->meting_thread(); +} + +int main() +{ + m = new Module(); + Thread uartthread(uartThread); + + wait(4); + RtosTimer meetTimer(meet); + meetTimer.start(4); + + m->mainLoop(); + while(1) + { + led1 =! led1; + wait(0.5); + } +}