int main(int argc,char* argv[]) { int rc; /** caribou_init() must first be called before any other CARIBOU function calls */ caribou_init(0); printf("** CARIBOU 0.9 STM32F407IGT6 DEMO **\n"); network_init(); caribou_exec(); }
int main(int argc,char* argv[]) { int rc; /** caribou_init() must first be called before any other CARIBOU function calls */ caribou_init(0); /** Allocate and start up the enqueue and dequeue threads... */ caribou_thread_create("thread1",thread1,NULL,NULL,stack1,THREAD_STACK_SIZE,THREAD_PRIORITY); caribou_thread_create("thread2",thread2,NULL,NULL,stack2,THREAD_STACK_SIZE,THREAD_PRIORITY); /** * House keep chores are managed from the main thread, and must be called via caribou_exec() * Never to return * No sleeping in the main thread! */ caribou_exec(); }
int main(int argc,char* argv[]) { int rc; /** caribou_init() must first be called before any other CARIBOU function calls */ caribou_init(0); print_summary(); /** Initialize a mutex object */ caribou_mutex_init(&test.mutex_a,0); /** Initialize a queue of the specified depth */ caribou_queue_init(&test.queue_a,QUEUE_DEPTH,&test.queue_msgs); /** Allocate and start up the enqueue and dequeue threads... */ caribou_thread_create("test1_thread",test1_thread,NULL,NULL,test.stack_thread1,THREAD_STACK_SIZE,THREAD_PRIORITY); caribou_thread_create("test2_thread",test2_thread,NULL,NULL,test.stack_thread2,THREAD_STACK_SIZE,THREAD_PRIORITY); caribou_thread_create("board_thread",board_thread,NULL,NULL,test.board_stack,THREAD_STACK_SIZE,THREAD_PRIORITY); /** * House keep chores are managed from the main thread, and must be called via caribou_exec() * Never to return */ caribou_exec(); }