Specifications
void* flags)
Commonly Called By
C/C++ programs
Device drivers
Thread-safe
Yes.
Available from ISR
No.
Include
<sys/alt_irq.h>
Description
The alt_ic_isr_register() function registers an ISR. If the function is successful, the requested
interrupt is enabled on return, and isr and isr_context are inserted in the vector table.
The function arguments are as follows:
• ic_id is the interrupt controller ID as defined in system.h, identifying the external interrupt controller
in the daisy chain. This argument is ignored if the external interrupt controller interface is not
implemented.
• irq is the IRQ number, as defined in system.h, identifying the interrupt to register.
• isr is the function that is called when the interrupt is accepted.
• isr_context is the input argument to isr. isr_context points to a data structure associated with the
device driver instance.
• flags is reserved.
The ISR function prototype is defined as follows:
typedef void (*alt_isr_func) (void* isr_context);
Calls to alt_ic_isr_register() replace previously registered handlers for interrupt irq.
If isr is set to null, the interrupt is disabled.
• A driver for an EIC must implement this function.
Return
This function returns zero if successful, or nonzero otherwise. The function fails if the irq parameter is
greater than the maximum interrupt port number supported by the external interrupt controller.
Related Information
• alt_ic_irq_enable() on page 14-34
• alt_ic_irq_enabled() on page 14-31
• alt_irq_cpu_enable_interrupts () on page 14-37
NII5V2
2015.05.14
alt_ic_isr_register()
14-33
HAL API Reference
Altera Corporation
Send Feedback