Designing Your Model: Model-Code Correspondence : Activity Charts : ISR (Interrupt Service Routine) Activities : ISR Categories : ISR - Examples of Generated Code

ISR - Examples of Generated Code

Code for a category 1 or 2 ISR, named ISR0, containing activities I01 and I02:

ISR (ISR0)
{

cgActivity_I01();

cgActivity_I02();

}

 

Code for a category 3 ISR function names ISR0, containing activities I01 and I02:

ISR (ISR0)
{

EnterISR();

cgActivity_I01();

cgActivity_I02();

LeaveISR();

}

Code for a category 3 ISR function named ISR1, containing activities I11 and I12, and a controller named CTRL1:

ISR (ISR1)
{

EnterISR();

do {

cgGlobalFlags &= ~BITSUPERSTEP_ISR1; MicroC 41

TASK/ISR Run Modes

cgActivity_I11();

cgActivity_I12();

cgActivity_CTRL1cnt1();

} while ( (cgGlobalFlags & BITSUPERSTEP_ISR1) != 0);

LeaveISR();

}