02.01.2015 Views

CooCox CoOS User's Guide

CooCox CoOS User's Guide

CooCox CoOS User's Guide

SHOW MORE
SHOW LESS

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

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

Saved successfully!

Ooh no, something went wrong!