
Code snipet
Dependencies: NySDFileSystem libMiMic mbed-rtos mbed
Fork of AsyncHttpdSample by
main.cpp@10:8a9023e05971, 2013-11-16 (annotated)
- Committer:
- nyatla
- Date:
- Sat Nov 16 04:31:21 2013 +0000
- Revision:
- 10:8a9023e05971
- Parent:
- 9:c6427be12f0d
1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nyatla | 0:ec1e45489427 | 1 | #include "mimic.h" |
nyatla | 8:384c8fb9f401 | 2 | #include "rtos.h" |
nyatla | 10:8a9023e05971 | 3 | DigitalOut led1(LED1); |
nyatla | 10:8a9023e05971 | 4 | int taskHandler(void* i_param) |
nyatla | 0:ec1e45489427 | 5 | { |
nyatla | 10:8a9023e05971 | 6 | int i=0; |
nyatla | 10:8a9023e05971 | 7 | for(;;){ |
nyatla | 10:8a9023e05971 | 8 | //LEDBLINK |
nyatla | 10:8a9023e05971 | 9 | led1=(i++)%2; |
nyatla | 10:8a9023e05971 | 10 | Thread::wait(1000); |
nyatla | 0:ec1e45489427 | 11 | } |
nyatla | 10:8a9023e05971 | 12 | // return 0; |
nyatla | 10:8a9023e05971 | 13 | } |
nyatla | 0:ec1e45489427 | 14 | int main() |
nyatla | 0:ec1e45489427 | 15 | { |
nyatla | 10:8a9023e05971 | 16 | NyLPC_TcThread_t* th=(NyLPC_TcThread_t*)malloc(sizeof(NyLPC_TcThread_t)); |
nyatla | 10:8a9023e05971 | 17 | NyLPC_cThread_initialize(th,256,NyLPC_TcThread_PRIORITY_IDLE); |
nyatla | 10:8a9023e05971 | 18 | NyLPC_cThread_start(th,taskHandler,NULL); |
nyatla | 8:384c8fb9f401 | 19 | for(;;){ |
nyatla | 8:384c8fb9f401 | 20 | Thread::wait(1000); |
nyatla | 8:384c8fb9f401 | 21 | } |
nyatla | 10:8a9023e05971 | 22 | // return 0; |
nyatla | 0:ec1e45489427 | 23 | } |
nyatla | 6:bcf3fe4d0ba1 | 24 |