Atmel Software Framework

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MEMORY - EIC - External Interrupt Controller

EIC allows pins to be configured as external interrupts.

Modules

 

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_INT1
 Line 0. More...
 
#define EXT_INT1   AVR32_EIC_INT2
 Line 1. More...
 
#define EXT_INT2   AVR32_EIC_INT3
 Line 2. More...
 
#define EXT_INT3   AVR32_EIC_INT4
 Line 3. More...
 
#define EXT_INT4   AVR32_EIC_INT5
 Line 4. More...
 
#define EXT_INT5   AVR32_EIC_INT6
 Line 5. More...
 
#define EXT_INT6   AVR32_EIC_INT7
 Line 6. More...
 
#define EXT_INT7   AVR32_EIC_INT8
 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 main().

#define EIC_EDGE_FALLING_EDGE   AVR32_EIC_FALLING_EDGE

Referenced by main().

#define EIC_EDGE_RISING_EDGE   AVR32_EIC_RISING_EDGE

Referenced by main().

#define EIC_FILTER_DISABLED   AVR32_EIC_FILTER_OFF
#define EIC_FILTER_ENABLED   AVR32_EIC_FILTER_ON

Referenced by main().

#define EIC_LEVEL_HIGH_LEVEL   AVR32_EIC_HIGH_LEVEL
#define EIC_LEVEL_LOW_LEVEL   AVR32_EIC_LOW_LEVEL

Referenced by main().

#define EIC_MODE_EDGE_TRIGGERED   AVR32_EIC_EDGE_IRQ

Referenced by main().

#define EIC_MODE_LEVEL_TRIGGERED   AVR32_EIC_LEVEL_IRQ

Referenced by main().

#define EIC_SYNCH_MODE   AVR32_EIC_SYNC

Referenced by main().

#define EXT_INT0   AVR32_EIC_INT1

Line 0.

#define EXT_INT1   AVR32_EIC_INT2

Line 1.

#define EXT_INT2   AVR32_EIC_INT3

Line 2.

#define EXT_INT3   AVR32_EIC_INT4

Line 3.

#define EXT_INT4   AVR32_EIC_INT5

Line 4.

#define EXT_INT5   AVR32_EIC_INT6

Line 5.

#define EXT_INT6   AVR32_EIC_INT7

Line 6.

#define EXT_INT7   AVR32_EIC_INT8

Line 7.

#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.

Parameters
eicBase address of the EIC (i.e. &AVR32_EIC).
line_numberLine number to clear

References cpu_irq_restore(), and cpu_irq_save().

Referenced by eic_int_handler1(), eic_int_handler2(), eic_nmi_handler(), main(), and touch_button_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.

Parameters
eicBase address of the EIC (i.e. &AVR32_EIC).
mask_linesMask 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
eicBase address of the EIC (i.e. &AVR32_EIC).
line_numberLine 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
eicBase address of the EIC (i.e. &AVR32_EIC).
mask_linesMask 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
eicBase 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
eicBase address of the EIC module
line_numberLine number to disable
void eic_disable_lines ( volatile avr32_eic_t *  eic,
uint32_t  mask_lines 
)

Disable the EIC driver.

Parameters
eicBase address of the EIC module
mask_linesMask 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
eicBase address of the EIC (i.e. &AVR32_EIC).
line_numberLine 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
eicBase address of the EIC (i.e. &AVR32_EIC).
mask_linesMask 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
eicBase address of the EIC (i.e. &AVR32_EIC).
prescPrescale select for the keypad scan rate in the range [0,31].

Referenced by main().

void eic_enable_line ( volatile avr32_eic_t *  eic,
uint32_t  line_number 
)

Enable the EIC driver.

Parameters
eicBase address of the EIC module
line_numberLine number to enable

Referenced by main().

void eic_enable_lines ( volatile avr32_eic_t *  eic,
uint32_t  mask_lines 
)

Enable the EIC driver.

Parameters
eicBase address of the EIC module
mask_linesMask 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
eicBase address of the EIC (i.e. &AVR32_EIC).

Referenced by eic_int_handler1(), and eic_int_handler2().

void eic_init ( volatile avr32_eic_t *  eic,
const eic_options_t opt,
uint32_t  nb_lines 
)

Init the EIC driver.

Parameters
eicBase address of the EIC module
optConfiguration parameters of the EIC module (see eic_options_t)
nb_linesNumber 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, eic_options_t::eic_mode, and i.

Referenced by main().

bool eic_is_interrupt_line_enabled ( volatile avr32_eic_t *  eic,
uint32_t  line_number 
)

Tells whether an EIC interrupt line is enabled.

Parameters
eicBase address of the EIC module
line_numberLine 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
eicBase address of the EIC module
line_numberLine 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
eicBase address of the EIC module
line_numberLine number to test
Returns
Whether an EIC line is enabled.