Visible to Intel only — GUID: zbz1652927239140
Ixiasoft
Visible to Intel only — GUID: zbz1652927239140
Ixiasoft
16.1.1.32. alt_ic_isr_register()
Prototype
int alt_ic_isr_register (alt_u32 ic_id,
alt_u32 irq,
alt_isr_func isr,
void* isr_context,
void* flags)
Commonly Called By
C/C++ programsDevice 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.