Interrupt Controller Driver for the AVR32 UC3 microcontrollers.
More...
Detailed Description
Module Source Dependencies
The following files must be built with any user project that uses this module:
- LUFA/Platform/UC3/InterruptManagement.c (Makefile source module name: LUFA_SRC_PLATFORM)
- LUFA/Platform/UC3/Exception.S (Makefile source module name: LUFA_SRC_PLATFORM)
Module Description
Interrupt controller driver for the AVR32 UC3 microcontrollers, for the configuration of interrupt handlers within the device.
Usage Example:
ISR(USB_Group_IRQ_Handler)
{
}
void main(void)
{
}
Macro Definition Documentation
#define INTC_IRQ_GROUP |
( |
|
IRQIndex | ) |
(IRQIndex / 32) |
Converts a given interrupt index into its associated interrupt group.
- Parameters
-
[in] | IRQIndex | Index of the interrupt request to convert. |
- Returns
- Interrupt group number associated with the interrupt index.
#define INTC_IRQ_LINE |
( |
|
IRQIndex | ) |
(IRQIndex % 32) |
Converts a given interrupt index into its associated interrupt line.
- Parameters
-
[in] | IRQIndex | Index of the interrupt request to convert. |
- Returns
- Interrupt line number associated with the interrupt index.
Function Documentation
static uint_reg_t INTC_GetGroupInterrupts |
( |
const uint16_t |
GroupNumber | ) |
|
|
inlinestatic |
Retrieves the pending interrupts for a given interrupt group. The result of this function should be masked against interrupt request indexes converted to a request line number via the INTC_IRQ_LINE() macro. To obtain the group number of a given interrupt request, use the INTC_IRQ_GROUP() macro.
- Parameters
-
[in] | GroupNumber | Group number of the interrupt group to check. |
- Returns
- Mask of pending interrupt lines for the given interrupt group.
InterruptHandlerPtr_t INTC_GetInterruptHandler |
( |
const uint_reg_t |
InterruptLevel | ) |
|
static void INTC_RegisterGroupHandler |
( |
const uint16_t |
GroupNumber, |
|
|
const uint8_t |
InterruptLevel, |
|
|
const InterruptHandlerPtr_t |
Handler |
|
) |
| |
|
inlinestatic |
Registers a handler for a given interrupt group. On the AVR32 UC3 devices, interrupts are grouped by peripheral. To save on SRAM used, a single ISR handles all interrupt lines within a single group - to determine the exact line that has interrupted within the group ISR handler, use INTC_GetGroupInterrupts().
If multiple interrupts with the same group are registered, the last registered handler will become the handler called for interrupts raised within that group.
To obtain the group number of a specific interrupt index, use the INTC_IRQ_GROUP() macro.
- Parameters
-
[in] | GroupNumber | Group number of the interrupt group to register a handler for. |
[in] | InterruptLevel | Priority level for the specified interrupt, a AVR32_INTC_INT* mask. |
[in] | Handler | Address of the ISR handler for the interrupt group. |