12.07.2015 Views

CooCox CoOS 用户手册

CooCox CoOS 用户手册

CooCox CoOS 用户手册

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>CooCox</strong> <strong>CoOS</strong> : 6.7.1 CoCreateSem()OS_EventID CoCreateSem( initCnt maxCnt sortTypeIDU16 initCnt,U16 maxCnt,U8 sortTypeEVENT_SORT_TYPE_FIFO );EVENT_SORT_TYPE_PRIO -1 #include "CCRTOS.h"OS_EventID semaphore;void TaskN (void *pdata){}.../* Create a semaphore */semaphore = CoCreateSem (1, 10, EVENT_SORT_TYPE_FIFO);if (semaphore == E_CREATE_FAIL){}else{}printf("Create semaphore failed !\n");printf("Semaphore ID : %d \n", semaphore);...:76

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!