Jump to main content

##

# 3.32.5 External Interrupt Controller (EIC)

The External Interrupt Controller (EIC) forwards external interrupt sources from two PIO lines to the interrupt controller by providing some pre-processing capabilities (filtering, polarity inversion, edge detection, enable).

## Using The Library

The interrupt properties of the EIC pins can be configured using MCC GUI. At run time the EIC PLIB APIs can be used to:

- Register interrupt callbacks for each EIC pins

- Enable/Disable EIC interrupts for each EIC pins

- Change the detection polarity for each EIC pin

- Freeze the configurations for each pins so that no further changes will be allowed.

## Library Interface

External Interrupt Controller peripheral library provides the following interfaces:

Functions

Name | Description
--- | ---
EIC_Initialize | Initializes given instance of EIC peripheral
EIC_InterruptEnable | Enable external interrupt on the specified pin
EIC_InterruptDisable | Disable external interrupt on the specified pin
EIC_CallbackRegister | Registers the function to be called when an interrupt condition has been sensed on the pin
EIC_SetPolarity | Sets the polarity of detection
EIC_FreezeConfiguration | Freeze EIC configuration

Data types and constants

Name | Type | Description
--- | --- | ---
EIC_PIN | Enum | Identifies the available EIC pins
EIC_POLARITY | Enum | Identifies all possible EIC polarities
EIC_CALLBACK | Typedef | Defines the data type and function signature of the EIC peripheral callback function