CooCox CoOS User's Guide
CooCox CoOS User's Guide
CooCox CoOS User's Guide
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
6.1.3 CoEnterISR()<br />
Function Prototype:<br />
void CoEnterISR(void);<br />
Descriptions:<br />
System enters the interrupts.<br />
Parameters:<br />
None<br />
Returns:<br />
None<br />
Example usage:<br />
#include "CCRTOS.h"<br />
void EXTI0_IRQHandler(void)<br />
{<br />
CoEnterISR(); // Enter ISR<br />
…<br />
/* Process interrupt here */<br />
…<br />
CoExitISR(); // Exit ISR<br />
}<br />
Note:<br />
1) When the system enters the interrupts, increase the interrupt nesting<br />
counter- OSIntNesting by one.<br />
2) CoEnterISR() and CoExitISR() must be used in pairs.<br />
6.1.4 CoExitISR()<br />
Function Prototype:<br />
void CoExitISR(void);<br />
Descriptions:<br />
System exits the interrupts.<br />
Returns:<br />
None<br />
Returns:<br />
None<br />
43