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> #include "CCRTOS.h"OS_EventID mailbox;void TaskN (void *pdata){StatusType result;void *msg;.../* Create a mailbox */msg = CoPendMail (mailbox, 20, &result);if (result != E_OK){if (result == E_INVALID_ID){printf("Invalid event ID !\n");}}else{printf("Recived %d \n", *(unsigned int *)msg);}...}void TaskM (void *pdata){StatusType result;unsigned int pridat;...pridat = 0x49;...result = CoPostMail (mailbox, &pridat);if (result != E_OK){if (result == E_INVALID_ID){printf("Invalid event ID !\n");}}}....1) 2 AcceptMail()PendMail():90

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

Saved successfully!

Ooh no, something went wrong!