EIC allows pins to be configured as external interrupts.
#define EIC_ASYNCH_MODE AVR32_EIC_USE_ASYNC |
#define EIC_EDGE_FALLING_EDGE AVR32_EIC_FALLING_EDGE |
#define EIC_EDGE_RISING_EDGE AVR32_EIC_RISING_EDGE |
#define EIC_FILTER_DISABLED AVR32_EIC_FILTER_OFF |
#define EIC_FILTER_ENABLED AVR32_EIC_FILTER_ON |
#define EIC_LEVEL_HIGH_LEVEL AVR32_EIC_HIGH_LEVEL |
#define EIC_LEVEL_LOW_LEVEL AVR32_EIC_LOW_LEVEL |
#define EIC_MODE_EDGE_TRIGGERED AVR32_EIC_EDGE_IRQ |
#define EIC_MODE_LEVEL_TRIGGERED AVR32_EIC_LEVEL_IRQ |
#define EIC_SYNCH_MODE AVR32_EIC_SYNC |
#define EXT_INT0 AVR32_EIC_INT0 |
#define EXT_INT1 AVR32_EIC_INT1 |
#define EXT_INT2 AVR32_EIC_INT2 |
#define EXT_INT3 AVR32_EIC_INT3 |
#define EXT_INT4 AVR32_EIC_INT4 |
#define EXT_INT5 AVR32_EIC_INT5 |
#define EXT_INT6 AVR32_EIC_INT6 |
#define EXT_INT7 AVR32_EIC_INT7 |
#define EXT_NMI AVR32_EIC_NMI |
void eic_clear_interrupt_line |
( |
volatile avr32_eic_t * |
eic, |
|
|
uint32_t |
line_number |
|
) |
| |
Clear the interrupt flag. Call this function once you've handled the interrupt.
- Parameters
-
eic | Base address of the EIC (i.e. &AVR32_EIC). |
line_number | Line number to clear |
References cpu_irq_restore(), and cpu_irq_save().
Referenced by eic_nmi_handler().
void eic_clear_interrupt_lines |
( |
volatile avr32_eic_t * |
eic, |
|
|
uint32_t |
mask_lines |
|
) |
| |
Clear the interrupt flag. Call this function once you've handled the interrupt.
- Parameters
-
eic | Base address of the EIC (i.e. &AVR32_EIC). |
mask_lines | Mask for current selected lines |
References cpu_irq_restore(), and cpu_irq_save().
void eic_disable_interrupt_line |
( |
volatile avr32_eic_t * |
eic, |
|
|
uint32_t |
line_number |
|
) |
| |
Disable the interrupt feature of the EIC.
- Parameters
-
eic | Base address of the EIC (i.e. &AVR32_EIC). |
line_number | Line number to disable |
References cpu_irq_restore(), and cpu_irq_save().
void eic_disable_interrupt_lines |
( |
volatile avr32_eic_t * |
eic, |
|
|
uint32_t |
mask_lines |
|
) |
| |
Disable the interrupt feature of the EIC.
- Parameters
-
eic | Base address of the EIC (i.e. &AVR32_EIC). |
mask_lines | Mask for current selected lines |
References cpu_irq_restore(), and cpu_irq_save().
void eic_disable_interrupt_scan |
( |
volatile avr32_eic_t * |
eic | ) |
|
Disable the interrupt scan feature of the EIC.
- Parameters
-
eic | Base address of the EIC (i.e. &AVR32_EIC). |
void eic_disable_line |
( |
volatile avr32_eic_t * |
eic, |
|
|
uint32_t |
line_number |
|
) |
| |
Disable the EIC driver.
- Parameters
-
eic | Base address of the EIC module |
line_number | Line number to disable |
void eic_disable_lines |
( |
volatile avr32_eic_t * |
eic, |
|
|
uint32_t |
mask_lines |
|
) |
| |
Disable the EIC driver.
- Parameters
-
eic | Base address of the EIC module |
mask_lines | Mask for current selected lines |
void eic_enable_interrupt_line |
( |
volatile avr32_eic_t * |
eic, |
|
|
uint32_t |
line_number |
|
) |
| |
Enable the interrupt feature of the EIC.
- Parameters
-
eic | Base address of the EIC (i.e. &AVR32_EIC). |
line_number | Line number to enable |
Referenced by main().
void eic_enable_interrupt_lines |
( |
volatile avr32_eic_t * |
eic, |
|
|
uint32_t |
mask_lines |
|
) |
| |
Enable the interrupt feature of the EIC.
- Parameters
-
eic | Base address of the EIC (i.e. &AVR32_EIC). |
mask_lines | Mask for current selected lines |
Referenced by main().
void eic_enable_interrupt_scan |
( |
volatile avr32_eic_t * |
eic, |
|
|
uint32_t |
presc |
|
) |
| |
Enable the interrupt scan feature of the EIC.
- Parameters
-
eic | Base address of the EIC (i.e. &AVR32_EIC). |
presc | Prescale select for the keypad scan rate in the range [0,31]. |
void eic_enable_line |
( |
volatile avr32_eic_t * |
eic, |
|
|
uint32_t |
line_number |
|
) |
| |
Enable the EIC driver.
- Parameters
-
eic | Base address of the EIC module |
line_number | Line number to enable |
Referenced by main().
void eic_enable_lines |
( |
volatile avr32_eic_t * |
eic, |
|
|
uint32_t |
mask_lines |
|
) |
| |
Enable the EIC driver.
- Parameters
-
eic | Base address of the EIC module |
mask_lines | Mask for current selected lines |
Referenced by main().
uint32_t eic_get_interrupt_pad_scan |
( |
volatile avr32_eic_t * |
eic | ) |
|
Return scan pad number that causes interrupt.
- Parameters
-
eic | Base address of the EIC (i.e. &AVR32_EIC). |
void eic_init |
( |
volatile avr32_eic_t * |
eic, |
|
|
const eic_options_t * |
opt, |
|
|
uint32_t |
nb_lines |
|
) |
| |
bool eic_is_interrupt_line_enabled |
( |
volatile avr32_eic_t * |
eic, |
|
|
uint32_t |
line_number |
|
) |
| |
Tells whether an EIC interrupt line is enabled.
- Parameters
-
eic | Base address of the EIC module |
line_number | Line number to test |
- Returns
- Whether an EIC interrupt line is enabled.
bool eic_is_interrupt_line_pending |
( |
volatile avr32_eic_t * |
eic, |
|
|
uint32_t |
line_number |
|
) |
| |
Tells whether an EIC interrupt line is pending.
- Parameters
-
eic | Base address of the EIC module |
line_number | Line number to test |
- Returns
- Whether an EIC interrupt line is pending.
bool eic_is_line_enabled |
( |
volatile avr32_eic_t * |
eic, |
|
|
uint32_t |
line_number |
|
) |
| |
Tells whether an EIC line is enabled.
- Parameters
-
eic | Base address of the EIC module |
line_number | Line number to test |
- Returns
- Whether an EIC line is enabled.