Driver API for EIC (plib_eic.h) More...
Macros | |
| #define | EIC_NUM_EXTINT_LINES EIC_EXTINT_NUM |
Typedefs | |
| typedef void(* | EIC_NMI_CALLBACK_HANDLER) (void) |
| NMI callback function type. | |
| typedef void(* | EIC_CALLBACK_HANDLER) (void) |
| External interrupt callback function type. | |
Enumerations | |
| enum | EIC_EXTINT_LINES { EIC_EXTINT_0 = 0 , EIC_EXTINT_1 = 1 , EIC_EXTINT_2 = 2 , EIC_EXTINT_3 = 3 , EIC_EXTINT_4 = 4 , EIC_EXTINT_5 = 5 , EIC_EXTINT_6 = 6 , EIC_EXTINT_7 = 7 , EIC_EXTINT_8 = 8 , EIC_EXTINT_9 = 9 , EIC_EXTINT_10 = 10 , EIC_EXTINT_11 = 11 , EIC_EXTINT_12 = 12 , EIC_EXTINT_13 = 13 , EIC_EXTINT_14 = 14 , EIC_EXTINT_15 = 15 } |
| External interrupt line. More... | |
Functions | |
| void | EIC_Enable (void) |
| Enables the External Interrupt Controller (EIC). | |
| void | EIC_Disable (void) |
| Disables the External Interrupt Controller (EIC). | |
| void | EIC_ResetSoftware (void) |
| Performs a software reset of the External Interrupt Controller (EIC). | |
| void | EIC_SelectClock (uint32_t clk_sel) |
| Selects the clock source for the EIC. EIC should be disabled before calling this function. | |
| void | EIC_ConfigureExtIntSense (EIC_EXTINT_LINES extint, uint32_t sense) |
| Configures the sense type for a specific external interrupt line. EIC should be disabled before calling this function. | |
| void | EIC_EnableExtIntFilter (EIC_EXTINT_LINES extint) |
| Enables the filter for a specific external interrupt line. EIC should be disabled before calling this function. | |
| void | EIC_DisableExtIntFilter (EIC_EXTINT_LINES extint) |
| Disables the filter for a specific external interrupt line. EIC should be disabled before calling this function. | |
| void | EIC_EnableExtIntAsync (EIC_EXTINT_LINES extint) |
| Enables asynchronous mode for a specific external interrupt line. EIC should be disabled before calling this function. | |
| void | EIC_DisableExtIntAsync (EIC_EXTINT_LINES extint) |
| Disables asynchronous mode for a specific external interrupt line. EIC should be disabled before calling this function. | |
| void | EIC_EnableExtIntEventOutput (EIC_EXTINT_LINES extint) |
| Enables event output for a specific external interrupt line. EIC should be disabled before calling this function. | |
| void | EIC_DisableExtIntEventOutput (EIC_EXTINT_LINES extint) |
| Disables event output for a specific external interrupt line. EIC should be disabled before calling this function. | |
| void | EIC_EnableExtInt (EIC_EXTINT_LINES extint) |
| Enables a specific external interrupt line. | |
| void | EIC_DisableExtInt (EIC_EXTINT_LINES extint) |
| Disables a specific external interrupt line. | |
| bool | EIC_ExtIntLineHasInterrupt (EIC_EXTINT_LINES extint) |
| Checks if a specific external interrupt line has triggered an interrupt. | |
| void | EIC_ClearExtIntFlag (EIC_EXTINT_LINES extint) |
| Clears the interrupt flag for a specific external interrupt line. | |
| void | EIC_SetExtIntCallbackHandler (EIC_EXTINT_LINES extint_line, EIC_CALLBACK_HANDLER callback) |
| Registers a callback function for a specific external interrupt line. | |
| void | EIC_ConfigureNMI (uint32_t sense, bool enable_filter, bool enable_async) |
| Configures the Non-Maskable Interrupt (NMI) sense type and options. | |
| void | EIC_SetNMICallbackHandler (EIC_NMI_CALLBACK_HANDLER callback) |
| Registers a callback function for the Non-Maskable Interrupt (NMI). | |
Driver API for EIC (plib_eic.h)
The following example demonstrates typical usage of the EIC peripheral:
| #define EIC_NUM_EXTINT_LINES EIC_EXTINT_NUM |
| EIC_CALLBACK_HANDLER |
External interrupt callback function type.
| EIC_NMI_CALLBACK_HANDLER |
NMI callback function type.
| enum EIC_EXTINT_LINES |
External interrupt line.
| void EIC_ClearExtIntFlag | ( | EIC_EXTINT_LINES | extint | ) |
Clears the interrupt flag for a specific external interrupt line.
| extint | The external interrupt line to clear the flag for. |
| void EIC_ConfigureExtIntSense | ( | EIC_EXTINT_LINES | extint, |
| uint32_t | sense ) |
Configures the sense type for a specific external interrupt line. EIC should be disabled before calling this function.
| extint | The external interrupt line to configure. |
| sense | The sense type to set (e.g., rising edge, falling edge). |
| void EIC_ConfigureNMI | ( | uint32_t | sense, |
| bool | enable_filter, | ||
| bool | enable_async ) |
Configures the Non-Maskable Interrupt (NMI) sense type and options.
| sense | The sense type to set for NMI. |
| enable_filter | Enable or disable the filter for NMI. |
| enable_async | Enable or disable asynchronous mode for NMI. |
| void EIC_Disable | ( | void | ) |
Disables the External Interrupt Controller (EIC).
| None. |
| void EIC_DisableExtInt | ( | EIC_EXTINT_LINES | extint | ) |
Disables a specific external interrupt line.
| extint | The external interrupt line to disable. |
| void EIC_DisableExtIntAsync | ( | EIC_EXTINT_LINES | extint | ) |
Disables asynchronous mode for a specific external interrupt line. EIC should be disabled before calling this function.
| extint | The external interrupt line to disable asynchronous mode for. |
| void EIC_DisableExtIntEventOutput | ( | EIC_EXTINT_LINES | extint | ) |
Disables event output for a specific external interrupt line. EIC should be disabled before calling this function.
| extint | The external interrupt line to disable event output for. |
| void EIC_DisableExtIntFilter | ( | EIC_EXTINT_LINES | extint | ) |
Disables the filter for a specific external interrupt line. EIC should be disabled before calling this function.
| extint | The external interrupt line to disable the filter for. |
| void EIC_Enable | ( | void | ) |
Enables the External Interrupt Controller (EIC).
| None. |
| void EIC_EnableExtInt | ( | EIC_EXTINT_LINES | extint | ) |
Enables a specific external interrupt line.
| extint | The external interrupt line to enable. |
| void EIC_EnableExtIntAsync | ( | EIC_EXTINT_LINES | extint | ) |
Enables asynchronous mode for a specific external interrupt line. EIC should be disabled before calling this function.
| extint | The external interrupt line to enable asynchronous mode for. |
| void EIC_EnableExtIntEventOutput | ( | EIC_EXTINT_LINES | extint | ) |
Enables event output for a specific external interrupt line. EIC should be disabled before calling this function.
| extint | The external interrupt line to enable event output for. |
| void EIC_EnableExtIntFilter | ( | EIC_EXTINT_LINES | extint | ) |
Enables the filter for a specific external interrupt line. EIC should be disabled before calling this function.
| extint | The external interrupt line to enable the filter for. |
| bool EIC_ExtIntLineHasInterrupt | ( | EIC_EXTINT_LINES | extint | ) |
Checks if a specific external interrupt line has triggered an interrupt.
| extint | The external interrupt line to check. |
| void EIC_ResetSoftware | ( | void | ) |
Performs a software reset of the External Interrupt Controller (EIC).
| None. |
| void EIC_SelectClock | ( | uint32_t | clk_sel | ) |
Selects the clock source for the EIC. EIC should be disabled before calling this function.
| clk_sel | The clock source to select. |
| void EIC_SetExtIntCallbackHandler | ( | EIC_EXTINT_LINES | extint_line, |
| EIC_CALLBACK_HANDLER | callback ) |
Registers a callback function for a specific external interrupt line.
| extint_line | The external interrupt line to register the callback for. |
| callback | The callback function to register. |
| void EIC_SetNMICallbackHandler | ( | EIC_NMI_CALLBACK_HANDLER | callback | ) |
Registers a callback function for the Non-Maskable Interrupt (NMI).
| callback | The callback function to register for NMI. |