Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
gd32_exti.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021 Teslabs Engineering S.L.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_DRIVERS_INTERRUPT_CONTROLLER_GD32_EXTI_H_
8#define ZEPHYR_INCLUDE_DRIVERS_INTERRUPT_CONTROLLER_GD32_EXTI_H_
9
10#include <stdint.h>
11
13
21#define GD32_EXTI_TRIG_NONE 0U
23#define GD32_EXTI_TRIG_RISING BIT(0)
25#define GD32_EXTI_TRIG_FALLING BIT(1)
27#define GD32_EXTI_TRIG_BOTH (GD32_EXTI_TRIG_RISING | GD32_EXTI_TRIG_FALLING)
28
32typedef void (*gd32_exti_cb_t)(uint8_t line, void *user);
33
40
47
54void gd32_exti_trigger(uint8_t line, uint8_t trigger);
55
66int gd32_exti_configure(uint8_t line, gd32_exti_cb_t cb, void *user);
67
68#endif /* ZEPHYR_INCLUDE_DRIVERS_INTERRUPT_CONTROLLER_GD32_EXTI_H_ */
int gd32_exti_configure(uint8_t line, gd32_exti_cb_t cb, void *user)
Configure EXTI interrupt callback.
void gd32_exti_disable(uint8_t line)
Disable EXTI interrupt for the given line.
void(* gd32_exti_cb_t)(uint8_t line, void *user)
Callback for EXTI interrupt.
Definition gd32_exti.h:32
void gd32_exti_trigger(uint8_t line, uint8_t trigger)
Configure EXTI interrupt trigger mode for the given line.
void gd32_exti_enable(uint8_t line)
Enable EXTI interrupt for the given line.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Macro utilities.