|
SAM4SD32 (SAM4S-EK2)
|
Parallel Input/Output (PIO) interrupt handler for SAM. More...
Go to the source code of this file.
Data Structures | |
| struct | s_interrupt_source |
| Describes a PIO interrupt source, including the PIO instance triggering the interrupt and the associated interrupt handler. More... | |
Macros | |
| #define | MAX_INTERRUPT_SOURCES 7 |
| Maximum number of interrupt sources that can be defined. | |
Functions | |
| void | pio_capture_handler_set (void(*p_handler)(Pio *)) |
| Set a capture interrupt handler for all PIO. | |
| void | pio_handler_process (Pio *p_pio, uint32_t ul_id) |
| Process an interrupt request on the given PIO controller. | |
| uint32_t | pio_handler_set (Pio *p_pio, uint32_t ul_id, uint32_t ul_mask, uint32_t ul_attr, void(*p_handler)(uint32_t, uint32_t)) |
| Set an interrupt handler for the provided pins. | |
| void | pio_handler_set_priority (Pio *p_pio, IRQn_Type ul_irqn, uint32_t ul_priority) |
| Initialize PIO interrupt management logic. | |
Variables | |
| static struct s_interrupt_source | gs_interrupt_sources [MAX_INTERRUPT_SOURCES] |
| static uint32_t | gs_ul_nb_sources = 0 |
| uint32_t | pio_capture_enable_flag |
| static void(* | pio_capture_handler )(Pio *) = NULL |
Parallel Input/Output (PIO) interrupt handler for SAM.
Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.
\cond ASF_LICENSE
Definition in file pio_handler.c.
| #define MAX_INTERRUPT_SOURCES 7 |
Maximum number of interrupt sources that can be defined.
This constant can be increased, but the current value is the smallest possible one that will be compatible with all existing projects.
Definition at line 45 of file pio_handler.c.
Referenced by pio_handler_process(), and pio_handler_set().
| void pio_capture_handler_set | ( | void(* | p_handler )(Pio *) | ) |
Set a capture interrupt handler for all PIO.
The handler will be called with the triggering PIO as its parameter as soon as an interrupt is detected.
| p_handler | Interrupt handler function pointer. |
Definition at line 174 of file pio_handler.c.
References pio_capture_handler.
| void pio_handler_process | ( | Pio * | p_pio, |
| uint32_t | ul_id ) |
Process an interrupt request on the given PIO controller.
| p_pio | PIO controller base address. |
| ul_id | PIO controller ID. |
Definition at line 79 of file pio_handler.c.
References gs_interrupt_sources, s_interrupt_source::mask, MAX_INTERRUPT_SOURCES, pio_capture_enable_flag, pio_capture_handler, pio_get_interrupt_mask(), and pio_get_interrupt_status().
| uint32_t pio_handler_set | ( | Pio * | p_pio, |
| uint32_t | ul_id, | ||
| uint32_t | ul_mask, | ||
| uint32_t | ul_attr, | ||
| void(* | p_handler )(uint32_t, uint32_t) ) |
Set an interrupt handler for the provided pins.
The provided handler will be called with the triggering pin as its parameter as soon as an interrupt is detected.
| p_pio | PIO controller base address. |
| ul_id | PIO ID. |
| ul_mask | Pins (bit mask) to configure. |
| ul_attr | Pins attribute to configure. |
| p_handler | Interrupt handler function pointer. |
Definition at line 132 of file pio_handler.c.
References s_interrupt_source::attr, gs_interrupt_sources, gs_ul_nb_sources, s_interrupt_source::handler, s_interrupt_source::id, s_interrupt_source::mask, MAX_INTERRUPT_SOURCES, and pio_configure_interrupt().
Initialize PIO interrupt management logic.
| p_pio | PIO controller base address. |
| ul_irqn | NVIC line number. |
| ul_priority | PIO controller interrupts priority. |
Definition at line 274 of file pio_handler.c.
References pio_disable_interrupt(), pio_enable_interrupt(), pio_get_interrupt_mask(), and pio_get_interrupt_status().
|
static |
Definition at line 62 of file pio_handler.c.
Referenced by pio_handler_process(), and pio_handler_set().
|
static |
Definition at line 65 of file pio_handler.c.
Referenced by pio_handler_set().
Definition at line 69 of file pio_handler.c.
Referenced by pio_capture_handler_set(), and pio_handler_process().