Zephyr API Documentation 4.2.0-rc3
A Scalable Open Source RTOS
 4.2.0-rc3
wch_exti.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025 Michael Hope <michaelh@juju.nz>
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_DRIVERS_INTERRUPT_CONTROLLER_WCH_EXTI_H_
8#define ZEPHYR_INCLUDE_DRIVERS_INTERRUPT_CONTROLLER_WCH_EXTI_H_
9
10#include <stdint.h>
11
13
14/* Callback for EXTI interrupt. */
15typedef void (*wch_exti_callback_handler_t)(uint8_t line, void *user);
16
18 /*
19 * Note that this is a flag set and these values can be ORed to trigger on
20 * both edges.
21 */
22
23 /* Trigger on rising edge */
25 /* Trigger on falling edge */
27};
28
29/* Enable the EXTI interrupt for `line` */
31
32/* Disable the EXTI interrupt for `line` */
34
35/* Set the trigger mode for `line` */
37
38/* Register a callback for `line` */
40
41#endif /* ZEPHYR_INCLUDE_DRIVERS_INTERRUPT_CONTROLLER_WCH_EXTI_H_ */
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition util_macro.h:44
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Macro utilities.
void wch_exti_disable(uint8_t line)
void wch_exti_enable(uint8_t line)
int wch_exti_configure(uint8_t line, wch_exti_callback_handler_t callback, void *user)
void(* wch_exti_callback_handler_t)(uint8_t line, void *user)
Definition wch_exti.h:15
void wch_exti_set_trigger(uint8_t line, enum wch_exti_trigger trigger)
wch_exti_trigger
Definition wch_exti.h:17
@ WCH_EXTI_TRIGGER_FALLING_EDGE
Definition wch_exti.h:26
@ WCH_EXTI_TRIGGER_RISING_EDGE
Definition wch_exti.h:24