Connects the function isr as the Interrupt Service Routine for the interrupt specified by irq. The ISR will be called with the parameter arg when the interrupt is raised.
The arg parameter is normally used to let one ISR service several devices of the same type.
void uartISR (void * arg)
{
volatile uart_t * pUART = (uart_t *)arg;
if (pUART->irq_status == ...)
{
...
}
}
void myInit (void)
{
int_connect (IRQ_UART0, uartISR, pUART0);
int_connect (IRQ_UART1, uartISR, pUART1);
int_enable (IRQ_UART0);
int_enable (IRQ_UART1);
}
- Parameters:
-
| irq | Interrupt to be serviced |
| isr | Interrupt service routine |
| arg | Sent as argument to ISR |