intc.c File Reference


Detailed Description

INTC driver for AVR32 UC3.

AVR32 Interrupt Controller driver module.

Author:
Atmel Corporation: http://www.atmel.com
Support and FAQ: http://support.atmel.no/

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.


Function Documentation

void INTC_register_interrupt ( __int_handler  handler,
unsigned int  irq,
unsigned int  int_level 
)

Registers an interrupt handler.

Parameters:
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.
Warning:
The interrupt handler must manage the `rete' instruction, what can be done thanks to pure assembly, inline assembly or the `__attribute__((__interrupt__))' C function attribute.

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.

Note:
Taken and adapted from Newlib.

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 }


Variable Documentation

void _evba

Exception Vector Base Address.

Referenced by INTC_register_interrupt().


Generated on Fri Feb 19 02:32:46 2010 for AVR32 - USB DFU Example: ISP by  doxygen 1.5.5