AVR32 Interrupt Controller driver module.
Definition in file intc.c.
#include <avr32/io.h>
#include "compiler.h"
#include "intc.h"
Go to the source code of this file.
Functions | |
void | INTC_register_interrupt (__int_handler handler, unsigned int irq, unsigned int int_level) |
Registers an interrupt handler. | |
Variables | |
void | _evba |
Exception Vector Base Address. |
void INTC_register_interrupt | ( | __int_handler | handler, | |
unsigned int | irq, | |||
unsigned int | int_level | |||
) |
Registers an interrupt handler.
handler | Interrupt handler to register. | |
irq | IRQ of the interrupt handler to register. | |
int_level | Interrupt priority level to assign to the group of this IRQ. |
If several interrupt handlers of a same group are registered, all interrupts of this group will fetch the last interrupt handler registered for this group with the last registered interrupt priority level.
Definition at line 57 of file intc.c.
References _evba, and AVR32_INTC_MAX_NUM_IRQS_PER_GRP.
00058 { 00059 // Program the IPRX register of the IRQ group to set the interrupt priority 00060 // level and the interrupt vector offset that will be fetched by the core 00061 // interrupt system. 00062 AVR32_INTC.ipr[irq / AVR32_INTC_MAX_NUM_IRQS_PER_GRP] = 00063 ((((U32)handler - (U32)&_evba) << AVR32_INTC_IPR_AUTOVECTOR_OFFSET) & AVR32_INTC_IPR_AUTOVECTOR_MASK) | 00064 ((int_level << AVR32_INTC_IPR_INTLEVEL_OFFSET) & AVR32_INTC_IPR_INTLEVEL_MASK); 00065 }
void _evba |