Lines Matching +full:data +full:- +full:pin +full:- +full:start
2 * Copyright (c) 2016 Open-RnD Sp. z o.o.
4 * Copyright (c) 2019-23 Linaro Limited
6 * SPDX-License-Identifier: Apache-2.0
23 #include <zephyr/dt-bindings/pinctrl/stm32-pinctrl-common.h> /* For STM32L0 series */
32 /** Start of the range */
33 uint8_t start; member
40 static IRQn_Type exti_irq_table[NUM_EXTI_LINES] = {[0 ... NUM_EXTI_LINES - 1] = 0xFF};
45 void *data; member
48 /* EXTI driver data */
50 /* per-line callbacks */
133 struct stm32_exti_data *data = dev->data; in stm32_exti_isr() local
139 for (uint8_t i = 0; i <= range->len; i++) { in stm32_exti_isr()
140 line_num = range->start + i; in stm32_exti_isr()
149 if (!data->cb[line_num].cb) { in stm32_exti_isr()
153 /* `line` can be passed as-is because LL_EXTI_LINE_n is (1 << n) */ in stm32_exti_isr()
154 data->cb[line_num].cb(line, data->cb[line_num].data); in stm32_exti_isr()
192 static void stm32_fill_irq_table(int8_t start, int8_t len, int32_t irqn) in stm32_fill_irq_table() argument
195 exti_irq_table[start + i] = irqn; in stm32_fill_irq_table()
200 * - populates line_range_x from line_range dt property
201 * - fill exti_irq_table through stm32_fill_irq_table()
202 * - calls IRQ_CONNECT for each interrupt and matching line_range
209 stm32_fill_irq_table(line_range_##idx.start, \
245 * defines of the LL EXTI API that corresponds to the provided pin.
252 stm32_gpio_irq_line_t stm32_gpio_intc_get_pin_irq_line(uint32_t port, gpio_pin_t pin) in stm32_gpio_intc_get_pin_irq_line() argument
255 return linenum_to_ll_exti_line(pin); in stm32_gpio_intc_get_pin_irq_line()
320 struct stm32_exti_data *data = dev->data; in stm32_gpio_intc_set_irq_callback() local
323 if ((data->cb[line_num].cb == cb) && (data->cb[line_num].data == user)) { in stm32_gpio_intc_set_irq_callback()
327 /* if callback already exists/maybe-running return busy */ in stm32_gpio_intc_set_irq_callback()
328 if (data->cb[line_num].cb != NULL) { in stm32_gpio_intc_set_irq_callback()
329 return -EBUSY; in stm32_gpio_intc_set_irq_callback()
332 data->cb[line_num].cb = cb; in stm32_gpio_intc_set_irq_callback()
333 data->cb[line_num].data = user; in stm32_gpio_intc_set_irq_callback()
341 struct stm32_exti_data *data = dev->data; in stm32_gpio_intc_remove_irq_callback() local
344 data->cb[line_num].cb = NULL; in stm32_gpio_intc_remove_irq_callback()
345 data->cb[line_num].data = NULL; in stm32_gpio_intc_remove_irq_callback()