Driver for external interrupts.
File(s):
The driver must be configured by supplying a project specific "px_exti_cfg.h". "px_exti_cfg_template.h" can be copied, renamed and modified to supply compile time options.
There are only 16 external interrupts (0 to 15). If Port A pin 0 is configured as external interrupt 0 for example, then Port B pin 0 can not be configured too, because it has already been assigned to A0.
When an external interrupt is disabled, it will not detect an interrupt condition and will not set the interrupt pending flag.
|
| typedef void(* | px_exti_handler_t) (void) |
| | Definition for a pointer to a function that will be called when the external interrupt triggers. More...
|
| |
|
|
#define | PX_EXTI_CFG_INT0_EN 1 |
| |
|
#define | PX_EXTI_CFG_INT1_EN 1 |
| |
|
#define | PX_EXTI_CFG_INT2_EN 1 |
| |
|
#define | PX_EXTI_CFG_INT3_EN 1 |
| |
|
#define | PX_EXTI_CFG_INT4_EN 1 |
| |
|
#define | PX_EXTI_CFG_INT5_EN 1 |
| |
|
#define | PX_EXTI_CFG_INT6_EN 1 |
| |
|
#define | PX_EXTI_CFG_INT7_EN 1 |
| |
|
#define | PX_EXTI_CFG_INT8_EN 1 |
| |
|
#define | PX_EXTI_CFG_INT9_EN 1 |
| |
|
#define | PX_EXTI_CFG_INT10_EN 1 |
| |
|
#define | PX_EXTI_CFG_INT11_EN 1 |
| |
|
#define | PX_EXTI_CFG_INT12_EN 1 |
| |
|
#define | PX_EXTI_CFG_INT13_EN 1 |
| |
|
#define | PX_EXTI_CFG_INT14_EN 1 |
| |
|
#define | PX_EXTI_CFG_INT15_EN 1 |
| |
◆ px_exti_handler_t
| typedef void(* px_exti_handler_t) (void) |
Definition for a pointer to a function that will be called when the external interrupt triggers.
Definition at line 142 of file px_exti.h.
◆ px_exti_line_t
External Interupt line.
Definition at line 98 of file px_exti.h.
◆ px_exti_port_t
External interrupt port.
Definition at line 119 of file px_exti.h.
◆ px_exti_type_t
External interrupt type.
Definition at line 130 of file px_exti.h.
◆ px_exti_init()
| void px_exti_init |
( |
void |
| ) |
|
Initialise External Interrupt driver.
Definition at line 221 of file px_exti.c.
◆ px_exti_open()
Configure External Interrupt.
- Parameters
-
| exti_port | Port (A, B,C, D, E or H) |
| exti_line | Line (0, 1, 2, ... or 15) |
| exti_handler | Handler function to be called when interrupt is triggered |
Definition at line 237 of file px_exti.c.
◆ px_exti_type_set()
Set External Interrupt type (fallig or rising edge or both)
- Parameters
-
| exti_line | Line (0, 1, 2, ... or 15) |
| exti_type | Falling or Rising Edge or Both |
Definition at line 344 of file px_exti.c.
◆ px_exti_enable()
Enable External Interrupt.
- Parameters
-
| exti_line | Line (0, 1, 2, ... or 15) |
Definition at line 369 of file px_exti.c.
◆ px_exti_disable()
Disable External Interrupt.
- Parameters
-
| exti_line | Line (0, 1, 2, ... or 15) |
Definition at line 376 of file px_exti.c.