Collaboration diagram for Interrupt Management:
Note, that it is not required to register interrupts with Nut/OS. Actually, this will route interrupts through the kernel, which results in performance degradation.
If fast interrupt processing is required, drivers as well as applications should consider using native interrupt handlers. Your compiler documentation is the right source to check how this can be done.
Functions | |
void | CallHandler (IRQ_HANDLER *irh) |
Call a registered interrupt handler. | |
int | NutRegisterIrqHandler (IRQ_HANDLER *irq, void(*handler)(void *), void *arg) |
Register an interrupt handler. | |
int | NutIrqEnable (IRQ_HANDLER *irq) |
Enable a specified interrupt. | |
int | NutIrqDisable (IRQ_HANDLER *irq) |
Disable a specified interrupt. | |
int | NutIrqSetPriority (IRQ_HANDLER *irq, int level) |
Modify the priority level of an interrupt. | |
int | NutIrqSetMode (IRQ_HANDLER *irq, int mode) |
Modify the interrupt mode. |
|
Register an interrupt handler. This function is typically called by device drivers, but applications may also implement their local interrupt handlers.
|
|
Enable a specified interrupt.
|
|
Disable a specified interrupt.
|
|
Modify the priority level of an interrupt. The function returns the old priority, which makes it easy to temporarily switch to another priority and later set back the old one.
|
|
Modify the interrupt mode. The function returns the old mode, which makes it easy to temporarily switch to another mode and later set back the old one.
|