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> 12CoAcceptSem() CoPendSem()6.7.6 isr_PostSem()StatusType isr_PostSem(OS_EventID id) ID id IDE_SEV_REQ_FULLE_INVALID_IDE_SEM_FULLE_OK#include "CCRTOS.h"OS_EventID semaphore;void XXX_IRQHandler(void){StatusType result; ID}EnterISR(); // Enter ISR.../* Post a semaphore */result = isr_PostSem (seamaphore);if (result != E_OK) {if (result == E_SEV_REQ_FULL) {printf("Service requst queue is full !\n");}}...ExitISR(); // Exit ISR:1 PostSem:82

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

Saved successfully!

Ooh no, something went wrong!