File syn_exti.c¶
FileList > drivers > syn_exti.c
Go to the source code of this file
GPIO interrupt dispatcher implementation.
#include "../util/syn_assert.h"#include "syn_exti.h"#include <string.h>
Classes¶
| Type | Name |
|---|---|
| struct | EXTI_Entry EXTI callback table entry. |
Public Static Attributes¶
| Type | Name |
|---|---|
| size_t | exti_count |
| EXTI_Entry | exti_table |
Public Functions¶
| Type | Name |
|---|---|
| size_t | syn_exti_count (void) Get the number of registered callbacks. |
| void | syn_exti_disable (SYN_GPIO_Pin pin) Disable interrupt for a pin. |
| void | syn_exti_enable (SYN_GPIO_Pin pin) Enable interrupt for a registered pin. |
| void | syn_exti_init (void) |
| void | syn_exti_irq_handler (SYN_GPIO_Pin pin) IRQ handler — call from platform ISR. |
| SYN_Status | syn_exti_register (SYN_GPIO_Pin pin, SYN_EXTI_Edge edge, SYN_EXTI_Callback cb, void * ctx) Register a callback for a pin interrupt. |
| void | syn_exti_unregister (SYN_GPIO_Pin pin) Unregister a pin callback. |
Public Static Functions¶
| Type | Name |
|---|---|
| EXTI_Entry * | find_entry (SYN_GPIO_Pin pin) Find the table entry for a given pin. |
Public Static Attributes Documentation¶
variable exti_count¶
Number of registered.
variable exti_table¶
Registered callbacks.
Public Functions Documentation¶
function syn_exti_count¶
Get the number of registered callbacks.
Returns:
Registration count.
function syn_exti_disable¶
Disable interrupt for a pin.
Parameters:
pinGPIO pin.
function syn_exti_enable¶
Enable interrupt for a registered pin.
Parameters:
pinGPIO pin.
function syn_exti_init¶
Initialize the EXTI dispatcher.
function syn_exti_irq_handler¶
IRQ handler — call from platform ISR.
Looks up the registered callback for pin and invokes it. This is the glue between hardware ISR and the dispatcher.
Parameters:
pinGPIO pin that triggered the interrupt.
function syn_exti_register¶
Register a callback for a pin interrupt.
SYN_Status syn_exti_register (
SYN_GPIO_Pin pin,
SYN_EXTI_Edge edge,
SYN_EXTI_Callback cb,
void * ctx
)
Parameters:
pinGPIO pin.edgeTrigger edge.cbCallback (runs in ISR context).ctxUser context passed to callback.
Returns:
SYN_OK, or SYN_ERROR if table full.
function syn_exti_unregister¶
Unregister a pin callback.
Parameters:
pinGPIO pin.
Public Static Functions Documentation¶
function find_entry¶
Find the table entry for a given pin.
Parameters:
pinGPIO pin.
Returns:
Pointer to entry, or NULL if not found.
The documentation for this class was generated from the following file src/syntropic/drivers/syn_exti.c