Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
gpio_intc_stm32.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 Open-RnD Sp. z o.o.
3 * Copyright (c) 2024 STMicroelectronics
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
15#ifndef ZEPHYR_DRIVERS_INTERRUPT_CONTROLLER_GPIO_INTC_STM32_H_
16#define ZEPHYR_DRIVERS_INTERRUPT_CONTROLLER_GPIO_INTC_STM32_H_
17
18#include <zephyr/types.h>
19#include <zephyr/drivers/gpio.h>
20
25
31
38
45
50 /* No trigger */
52 /* Trigger on rising edge */
54 /* Trigger on falling edge */
56 /* Trigger on both rising and falling edge */
58 /* Trigger on high level */
60 /* Trigger on low level */
62};
63
71
80typedef void (*stm32_gpio_irq_cb_t)(gpio_port_pins_t pin, void *user);
81
91 stm32_gpio_irq_cb_t cb, void *user);
92
99
102#if defined(CONFIG_EXTI_STM32) /* EXTI-specific extensions */
109void stm32_exti_set_line_src_port(gpio_pin_t line, uint32_t port);
110
117uint32_t stm32_exti_get_line_src_port(gpio_pin_t line);
118#endif /* CONFIG_EXTI_STM32 */
119
120#endif /* ZEPHYR_DRIVERS_INTERRUPT_CONTROLLER_GPIO_INTC_STM32_H_ */
Public APIs for GPIO drivers.
stm32_gpio_irq_line_t stm32_gpio_intc_get_pin_irq_line(uint32_t port, gpio_pin_t pin)
Get the GPIO interrupt line value corresponding to specified pin of GPIO port port.
void stm32_gpio_intc_disable_line(stm32_gpio_irq_line_t line)
Disable GPIO interrupts for specified line.
void stm32_gpio_intc_remove_irq_callback(stm32_gpio_irq_line_t line)
Removes the interrupt callback of specified EXTI line.
void stm32_gpio_intc_select_line_trigger(stm32_gpio_irq_line_t line, uint32_t trg)
Select trigger for interrupt on specified GPIO line.
int stm32_gpio_intc_set_irq_callback(stm32_gpio_irq_line_t line, stm32_gpio_irq_cb_t cb, void *user)
Set callback invoked when an interrupt occurs on specified GPIO line.
uint32_t stm32_gpio_irq_line_t
GPIO interrupt controller API for STM32 MCUs.
Definition gpio_intc_stm32.h:24
void(* stm32_gpio_irq_cb_t)(gpio_port_pins_t pin, void *user)
GPIO interrupt callback function signature.
Definition gpio_intc_stm32.h:80
stm32_gpio_irq_trigger
GPIO interrupt trigger flags.
Definition gpio_intc_stm32.h:49
@ STM32_GPIO_IRQ_TRIG_LOW_LEVEL
Definition gpio_intc_stm32.h:61
@ STM32_GPIO_IRQ_TRIG_FALLING
Definition gpio_intc_stm32.h:55
@ STM32_GPIO_IRQ_TRIG_BOTH
Definition gpio_intc_stm32.h:57
@ STM32_GPIO_IRQ_TRIG_RISING
Definition gpio_intc_stm32.h:53
@ STM32_GPIO_IRQ_TRIG_HIGH_LEVEL
Definition gpio_intc_stm32.h:59
@ STM32_GPIO_IRQ_TRIG_NONE
Definition gpio_intc_stm32.h:51
void stm32_gpio_intc_enable_line(stm32_gpio_irq_line_t line)
Enable GPIO interrupts for specified line.
uint8_t gpio_pin_t
Provides a type to hold a GPIO pin index.
Definition gpio.h:254
uint32_t gpio_port_pins_t
Identifies a set of pins associated with a port.
Definition gpio.h:233
__UINT32_TYPE__ uint32_t
Definition stdint.h:90