![]() |
PDL for FM0+
Version1.0
Peripheral Driverl Library for FM0+
|
Provided functions of EXINT module:
Exint_Enable() starts external interrupt detection and Exint_Disable() stops external interrupt detection.
Exint_SetIntDetectMode() sets the detection level of external interrupt.
Exint_GetIntDetectMode() gets the detection level of external interrupt.
Exint_IrqHandler() is external interrupt IRQ handler, which is called in the interrupts.c
#define EXINT_CHANNEL_NUM (8u) |
#define EXINT_MAX_CH_INDEX (31u) |
Definition at line 96 of file exint.h.
Referenced by Exint_Disable(), Exint_Enable(), and Exint_SetIntDetectMode().
typedef enum en_exint_instance_index en_exint_instance_index_t |
Enumeration to define an index for each enabled EXINT instance.
typedef enum en_exint_level en_exint_level_t |
Enumeration to define an index for each enabled EXINT instance.
enum en_exint_level |
en_result_t Exint_Disable | ( | uint8_t | u8Ch | ) |
Dsiable external interrupt.
u8Ch | 0~31 |
Ok | Interreupt disabled normally |
ErrorInvalidParameter | u8Ch > EXINT_MAX_CH_INDEX |
Definition at line 172 of file exint.c.
References apfnExintCallback, ErrorInvalidParameter, EXINT_MAX_CH_INDEX, Ok, and PDL_DEFAULT_INTERRUPT_LEVEL.
en_result_t Exint_Enable | ( | uint8_t | u8Ch, |
func_ptr_t | pfnIntCb | ||
) |
Enable external interrupt.
u8Ch | 0~31 |
pfnIntCb | Interrupt callback function |
Definition at line 133 of file exint.c.
References apfnExintCallback, ErrorInvalidParameter, EXINT_MAX_CH_INDEX, Ok, and PDL_IRQ_LEVEL_EXINT0_7.
en_exint_level_t Exint_GetIntDetectMode | ( | uint8_t | u8Ch | ) |
Get the external interrupt detection mode.
u8Ch | 0~31 |
ExIntLowLevel | Low level is active edge for interrupt detection |
ExIntHighLevel | High level is active edge for interrupt detection |
ExIntRisingEdge | Rising edge is active edge for interrupt detection |
ExIntFallingEdge | Falling edge is active edge for interrupt detection |
void Exint_IrqHandler | ( | uint8_t | u8Channel | ) |
Interrupt handlers for External interrupts.
This function clears the cause bit and calls the callback function
Definition at line 113 of file exint.c.
References apfnExintCallback.
Referenced by INT0_7_Handler(), and INT8_31_Handler().
en_result_t Exint_Nmi_SetIntCallback | ( | func_ptr_t | pfnIntCb | ) |
Set the interrupt callback function of NMI.
pfnIntCb | pointer to interrupt callback function |
Ok | NMI callback function set normally |
ErrorInvalidParameter | pfnIntCb == NULL |
Definition at line 296 of file exint.c.
References ErrorInvalidParameter, Ok, and pfnNMICallback.
en_result_t Exint_SetIntDetectMode | ( | uint8_t | u8Ch, |
en_exint_level_t | enLevel | ||
) |
Set external interrupt detect mode.
u8Ch | 0~31 |
enLevel | External interrupt active level
|
Ok | Interrupt detection edge set normmally |
ErrorInvalidParameter | u8Ch > EXINT_MAX_CH_INDEX invalid setting for enLevel |
Definition at line 217 of file exint.c.
References ErrorInvalidParameter, EXINT_MAX_CH_INDEX, ExIntFallingEdge, ExIntHighLevel, ExIntLowLevel, ExIntRisingEdge, and Ok.
void Nmi_IrqHandler | ( | void | ) |
Interrupt handler for None-Maskable Interrupt (NMI)
This function clears the cause bit and calls the NMI callback function, if specified.
Definition at line 271 of file exint.c.
References pfnNMICallback.
Referenced by NMI_Handler().
func_ptr_t apfnExintCallback[(8u)] |
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }
Definition at line 79 of file exint.c.
Referenced by Exint_Disable(), Exint_Enable(), and Exint_IrqHandler().
NMI Callback pointer.
External interrupts callback pointer array
Definition at line 74 of file exint.c.
Referenced by Exint_Nmi_SetIntCallback(), and Nmi_IrqHandler().