EIC driver for SAM.
Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
#include "compiler.h"
Data Structures | |
struct | eic_line_config |
Configuration parameters of the EIC module. More... | |
Macros | |
#define | EIC_NUMBER_OF_LINES 9 |
Number of available EIC lines, device dependent. More... | |
External Interrupt lines | |
#define | EXT_NMI 0 |
Non-Maskable Interrupt. More... | |
#define | EXT_INT1 1 |
External Interrupt 1. More... | |
#define | EXT_INT2 2 |
External Interrupt 2. More... | |
#define | EXT_INT3 3 |
External Interrupt 3. More... | |
#define | EXT_INT4 4 |
External Interrupt 4. More... | |
#define | EXT_INT5 5 |
External Interrupt 5. More... | |
#define | EXT_INT6 6 |
External Interrupt 6. More... | |
#define | EXT_INT7 7 |
External Interrupt 7. More... | |
#define | EXT_INT8 8 |
External Interrupt 8. More... | |
Mode Trigger Options | |
#define | EIC_MODE_EDGE_TRIGGERED 0 |
The interrupt is edge triggered. More... | |
#define | EIC_MODE_LEVEL_TRIGGERED 1 |
The interrupt is level triggered. More... | |
Edge level Options | |
#define | EIC_EDGE_FALLING_EDGE 0 |
The interrupt triggers on falling edge. More... | |
#define | EIC_EDGE_RISING_EDGE 1 |
The interrupt triggers on rising edge. More... | |
Level Options | |
#define | EIC_LEVEL_LOW_LEVEL 0 |
The interrupt triggers on low level. More... | |
#define | EIC_LEVEL_HIGH_LEVEL 1 |
The interrupt triggers on high level. More... | |
Filter Options | |
#define | EIC_FILTER_ENABLED 1 |
The interrupt is filtered. More... | |
#define | EIC_FILTER_DISABLED 0 |
The interrupt is not filtered. More... | |
Synch Mode Options | |
#define | EIC_SYNCH_MODE 0 |
The interrupt is synchronized to CLK_SYNC. More... | |
#define | EIC_ASYNCH_MODE 1 |
The interrupt is asynchronous. More... | |
Typedefs | |
typedef void(* | eic_callback_t )(void) |
Callback definition. More... | |
Functions | |
void | eic_disable (Eic *eic) |
Disable the EIC module. More... | |
void | eic_enable (Eic *eic) |
Enable the EIC module. More... | |
static void | eic_line_clear_interrupt (Eic *eic, uint8_t line_number) |
Clear the interrupt flag of specified pin. More... | |
static void | eic_line_disable (Eic *eic, uint8_t line_number) |
Disable the external interrupt on specified line. More... | |
static void | eic_line_disable_interrupt (Eic *eic, uint8_t line_number) |
Disables the propagation from the EIC to the interrupt controller of the external interrupt on a specified line. More... | |
static void | eic_line_enable (Eic *eic, uint8_t line_number) |
Enable the external interrupt on specified line. More... | |
static void | eic_line_enable_interrupt (Eic *eic, uint8_t line_number) |
Enables the propagation from the EIC to the interrupt controller of the external interrupt on a specified line. More... | |
static bool | eic_line_interrupt_is_enabled (Eic *eic, uint8_t line_number) |
Tells whether an EIC interrupt line is enabled. More... | |
static bool | eic_line_interrupt_is_pending (Eic *eic, uint8_t line_number) |
Tells whether an EIC interrupt line is pending. More... | |
static bool | eic_line_is_enabled (Eic *eic, uint8_t line_number) |
Tells whether an EIC line is enabled. More... | |
void | eic_line_set_callback (Eic *eic, uint8_t line_number, eic_callback_t callback, uint8_t irq_line, uint8_t irq_level) |
Set callback for given EIC line. More... | |
void | eic_line_set_config (Eic *eic, uint8_t line_number, struct eic_line_config *eic_line_conf) |
Program the EIC hardware with the specified configuration. More... | |