Code snipet

Dependencies:   NySDFileSystem libMiMic mbed-rtos mbed

Fork of AsyncHttpdSample by Ryo Iizuka

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mimic.h"
00002 #include "rtos.h"
00003 DigitalOut led1(LED1);
00004 int taskHandler(void* i_param)
00005 {
00006     int i=0;
00007     for(;;){
00008         //LEDBLINK
00009         led1=(i++)%2;
00010         Thread::wait(1000);
00011     }
00012 //    return 0;
00013 }
00014 int main()
00015 {
00016     NyLPC_TcThread_t* th=(NyLPC_TcThread_t*)malloc(sizeof(NyLPC_TcThread_t));
00017     NyLPC_cThread_initialize(th,256,NyLPC_TcThread_PRIORITY_IDLE);
00018     NyLPC_cThread_start(th,taskHandler,NULL);
00019     for(;;){
00020         Thread::wait(1000);
00021     }
00022  //   return 0;
00023 }
00024