Zephyr API 3.6.99
|
Go to the source code of this file.
Macros | |
EXTI trigger modes. | |
#define | GD32_EXTI_TRIG_NONE 0U |
No trigger. | |
#define | GD32_EXTI_TRIG_RISING BIT(0) |
Trigger on rising edge. | |
#define | GD32_EXTI_TRIG_FALLING BIT(1) |
Trigger on falling edge. | |
#define | GD32_EXTI_TRIG_BOTH (GD32_EXTI_TRIG_RISING | GD32_EXTI_TRIG_FALLING) |
Trigger on rising and falling edge. | |
Typedefs | |
typedef void(* | gd32_exti_cb_t) (uint8_t line, void *user) |
Callback for EXTI interrupt. | |
Functions | |
void | gd32_exti_enable (uint8_t line) |
Enable EXTI interrupt for the given line. | |
void | gd32_exti_disable (uint8_t line) |
Disable EXTI interrupt for the given line. | |
void | gd32_exti_trigger (uint8_t line, uint8_t trigger) |
Configure EXTI interrupt trigger mode for the given line. | |
int | gd32_exti_configure (uint8_t line, gd32_exti_cb_t cb, void *user) |
Configure EXTI interrupt callback. | |
#define GD32_EXTI_TRIG_BOTH (GD32_EXTI_TRIG_RISING | GD32_EXTI_TRIG_FALLING) |
Trigger on rising and falling edge.
#define GD32_EXTI_TRIG_FALLING BIT(1) |
Trigger on falling edge.
#define GD32_EXTI_TRIG_NONE 0U |
No trigger.
#define GD32_EXTI_TRIG_RISING BIT(0) |
Trigger on rising edge.
typedef void(* gd32_exti_cb_t) (uint8_t line, void *user) |
Callback for EXTI interrupt.
int gd32_exti_configure | ( | uint8_t | line, |
gd32_exti_cb_t | cb, | ||
void * | user ) |
Configure EXTI interrupt callback.
line | EXTI line. |
cb | Callback (NULL to disable). |
user | User data (optional). |
0 | On success. |
-EALREADY | If callback is already set and cb is not NULL. |
void gd32_exti_disable | ( | uint8_t | line | ) |
Disable EXTI interrupt for the given line.
line | EXTI line. |
void gd32_exti_enable | ( | uint8_t | line | ) |
Enable EXTI interrupt for the given line.
line | EXTI line. |
Configure EXTI interrupt trigger mode for the given line.
line | EXTI line. |
trigger | Trigger mode (see GD32_EXTI_TRIG). |