EIC allows pins to be configured as external interrupts.
Data Structures | |
struct | eic_options_t |
Configuration parameters of the EIC module. More... | |
Functions | |
void | eic_disable_line (volatile avr32_eic_t *eic, uint32_t line_number) |
Disable the EIC driver. More... | |
void | eic_disable_lines (volatile avr32_eic_t *eic, uint32_t mask_lines) |
Disable the EIC driver. More... | |
void | eic_enable_line (volatile avr32_eic_t *eic, uint32_t line_number) |
Enable the EIC driver. More... | |
void | eic_enable_lines (volatile avr32_eic_t *eic, uint32_t mask_lines) |
Enable the EIC driver. More... | |
void | eic_init (volatile avr32_eic_t *eic, const eic_options_t *opt, uint32_t nb_lines) |
Init the EIC driver. More... | |
bool | eic_is_line_enabled (volatile avr32_eic_t *eic, uint32_t line_number) |
Tells whether an EIC line is enabled. More... | |
External Interrupt lines | |
#define | EXT_INT0 AVR32_EIC_INT0 |
Line 0. More... | |
#define | EXT_INT1 AVR32_EIC_INT1 |
Line 1. More... | |
#define | EXT_INT2 AVR32_EIC_INT2 |
Line 2. More... | |
#define | EXT_INT3 AVR32_EIC_INT3 |
Line 3. More... | |
#define | EXT_INT4 AVR32_EIC_INT4 |
Line 4. More... | |
#define | EXT_INT5 AVR32_EIC_INT5 |
Line 5. More... | |
#define | EXT_INT6 AVR32_EIC_INT6 |
Line 6. More... | |
#define | EXT_INT7 AVR32_EIC_INT7 |
Line 7. More... | |
#define | EXT_NMI AVR32_EIC_NMI |
Line 8. More... | |
Mode Trigger Options | |
#define | EIC_MODE_EDGE_TRIGGERED AVR32_EIC_EDGE_IRQ |
#define | EIC_MODE_LEVEL_TRIGGERED AVR32_EIC_LEVEL_IRQ |
Edge level Options | |
#define | EIC_EDGE_FALLING_EDGE AVR32_EIC_FALLING_EDGE |
#define | EIC_EDGE_RISING_EDGE AVR32_EIC_RISING_EDGE |
Level Options | |
#define | EIC_LEVEL_LOW_LEVEL AVR32_EIC_LOW_LEVEL |
#define | EIC_LEVEL_HIGH_LEVEL AVR32_EIC_HIGH_LEVEL |
Filter Options | |
#define | EIC_FILTER_ENABLED AVR32_EIC_FILTER_ON |
#define | EIC_FILTER_DISABLED AVR32_EIC_FILTER_OFF |
Synch Mode Options | |
#define | EIC_SYNCH_MODE AVR32_EIC_SYNC |
#define | EIC_ASYNCH_MODE AVR32_EIC_USE_ASYNC |
Interrupt Control Functions | |
void | eic_enable_interrupt_lines (volatile avr32_eic_t *eic, uint32_t mask_lines) |
Enable the interrupt feature of the EIC. More... | |
void | eic_enable_interrupt_line (volatile avr32_eic_t *eic, uint32_t line_number) |
Enable the interrupt feature of the EIC. More... | |
void | eic_disable_interrupt_lines (volatile avr32_eic_t *eic, uint32_t mask_lines) |
Disable the interrupt feature of the EIC. More... | |
void | eic_disable_interrupt_line (volatile avr32_eic_t *eic, uint32_t line_number) |
Disable the interrupt feature of the EIC. More... | |
bool | eic_is_interrupt_line_enabled (volatile avr32_eic_t *eic, uint32_t line_number) |
Tells whether an EIC interrupt line is enabled. More... | |
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. More... | |
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. More... | |
bool | eic_is_interrupt_line_pending (volatile avr32_eic_t *eic, uint32_t line_number) |
Tells whether an EIC interrupt line is pending. More... | |
void | eic_enable_interrupt_scan (volatile avr32_eic_t *eic, uint32_t presc) |
Enable the interrupt scan feature of the EIC. More... | |
void | eic_disable_interrupt_scan (volatile avr32_eic_t *eic) |
Disable the interrupt scan feature of the EIC. More... | |
uint32_t | eic_get_interrupt_pad_scan (volatile avr32_eic_t *eic) |
Return scan pad number that causes interrupt. More... | |
#define EIC_ASYNCH_MODE AVR32_EIC_USE_ASYNC |
Referenced by ui_enable_asynchronous_interrupt().
#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 |
Referenced by ui_enable_asynchronous_interrupt().
#define EIC_LEVEL_HIGH_LEVEL AVR32_EIC_HIGH_LEVEL |
#define EIC_LEVEL_LOW_LEVEL AVR32_EIC_LOW_LEVEL |
Referenced by ui_enable_asynchronous_interrupt().
#define EIC_MODE_EDGE_TRIGGERED AVR32_EIC_EDGE_IRQ |
#define EIC_MODE_LEVEL_TRIGGERED AVR32_EIC_LEVEL_IRQ |
Referenced by ui_enable_asynchronous_interrupt().
#define EIC_SYNCH_MODE AVR32_EIC_SYNC |
#define EXT_INT0 AVR32_EIC_INT0 |
Line 0.
#define EXT_INT1 AVR32_EIC_INT1 |
Line 1.
#define EXT_INT2 AVR32_EIC_INT2 |
Line 2.
#define EXT_INT3 AVR32_EIC_INT3 |
Line 3.
#define EXT_INT4 AVR32_EIC_INT4 |
Line 4.
#define EXT_INT5 AVR32_EIC_INT5 |
Line 5.
#define EXT_INT6 AVR32_EIC_INT6 |
Line 6.
Referenced by ISR(), ui_disable_asynchronous_interrupt(), and ui_enable_asynchronous_interrupt().
#define EXT_INT7 AVR32_EIC_INT7 |
Line 7.
Referenced by ISR(), ui_disable_asynchronous_interrupt(), and ui_enable_asynchronous_interrupt().
#define EXT_NMI AVR32_EIC_NMI |
Line 8.
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.
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 ISR().
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.
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.
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.
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.
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.
eic | Base address of the EIC module |
line_number | Line number to disable |
Referenced by ui_disable_asynchronous_interrupt().
void eic_disable_lines | ( | volatile avr32_eic_t * | eic, |
uint32_t | mask_lines | ||
) |
Disable the EIC driver.
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.
eic | Base address of the EIC (i.e. &AVR32_EIC). |
line_number | Line number to enable |
void eic_enable_interrupt_lines | ( | volatile avr32_eic_t * | eic, |
uint32_t | mask_lines | ||
) |
Enable the interrupt feature of the EIC.
eic | Base address of the EIC (i.e. &AVR32_EIC). |
mask_lines | Mask for current selected lines |
void eic_enable_interrupt_scan | ( | volatile avr32_eic_t * | eic, |
uint32_t | presc | ||
) |
Enable the interrupt scan feature of the EIC.
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.
eic | Base address of the EIC module |
line_number | Line number to enable |
Referenced by ui_enable_asynchronous_interrupt().
void eic_enable_lines | ( | volatile avr32_eic_t * | eic, |
uint32_t | mask_lines | ||
) |
Enable the EIC driver.
eic | Base address of the EIC module |
mask_lines | Mask for current selected lines |
uint32_t eic_get_interrupt_pad_scan | ( | volatile avr32_eic_t * | eic | ) |
Return scan pad number that causes interrupt.
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 | ||
) |
Init the EIC driver.
eic | Base address of the EIC module |
opt | Configuration parameters of the EIC module (see eic_options_t) |
nb_lines | Number of lines to consider, equal to size of opt buffer |
References eic_options_t::eic_async, eic_options_t::eic_edge, eic_options_t::eic_filter, eic_options_t::eic_level, eic_options_t::eic_line, and eic_options_t::eic_mode.
Referenced by ui_enable_asynchronous_interrupt().
bool eic_is_interrupt_line_enabled | ( | volatile avr32_eic_t * | eic, |
uint32_t | line_number | ||
) |
Tells whether an EIC interrupt line is enabled.
eic | Base address of the EIC module |
line_number | Line number to test |
bool eic_is_interrupt_line_pending | ( | volatile avr32_eic_t * | eic, |
uint32_t | line_number | ||
) |
Tells whether an EIC interrupt line is pending.
eic | Base address of the EIC module |
line_number | Line number to test |
bool eic_is_line_enabled | ( | volatile avr32_eic_t * | eic, |
uint32_t | line_number | ||
) |
Tells whether an EIC line is enabled.
eic | Base address of the EIC module |
line_number | Line number to test |