12.07.2015 Views

CooCox CoOS 用户手册

CooCox CoOS 用户手册

CooCox CoOS 用户手册

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>CooCox</strong> <strong>CoOS</strong> #include "CCRTOS.h"OS_FlagID flag;void TaskN (void *pdata){StatusType result;.../* Waiting for a flag, time-out:20 */result = CoWaitForSingleFlag (flag, 20);if (result != E_OK){if (result == E_INVALID_ID){printf("Invalid Flag ID !\n");}else if (result == E_CALL){printf("Error call in ISR !\n");}else if (result == E_TIMEOUT){printf("Time Out !\n");}}else{/* process Flag here */}...}6.10.6 CoWaitForMultipleFlags()U32 CoWaitForMultipleFlags(U32flags,U8waitType,U32timeout,StatusType* perr);:107

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

Saved successfully!

Ooh no, something went wrong!