Does using the __irq at the end of the function automatically calls itself when an interrupt occurs? for e.g. void ISR_TIMER0(void) __irq {
int interrupt; //-------------------------- if( T0IR & _MR0 ) { interrupt = _MR0; if(isrT0MR0Handler != NULL) (*isrT0MR0Handler)(); //call Timer0-Match0 handler function } else if( T0IR & _MR1) { interrupt = _MR1; if(isrT0MR1Handler != NULL) (*isrT0MR1Handler)(); //call Timer0-Match1 handler function } else if( T0IR & _MR2) { interrupt = _MR2; if(isrT0MR2Handler != NULL) (*isrT0MR2Handler)(); //call Timer0-Match2 handler function } else if( T0IR & _MR3) { interrupt = _MR3; if(isrT0MR3Handler != NULL) (*isrT0MR3Handler)(); //call Timer0-Match3 handler function } else if( T0IR & _CR0) { interrupt = _CR0; if(isrT0CR0Handler != NULL) (*isrT0CR0Handler)(); //call Timer0-Capture0 handler function } else if( T0IR & _CR1) { interrupt = _CR1; if(*isrT0CR1Handler != NULL) (isrT0CR1Handler)(); //call Timer0-Capture1 handler function } //-------------------------- T0IR |= interrupt; //clear interrrupt //-------------------------- }
This is example of a interrupt function. Tell me the interrupt handler function and when will the function get called?