Skip to content

Commit cfe77c3

Browse files
committed
include: gpio: Add isr_ok to interrupt configure API
Add isr_ok property to the interrupt configure API. For level-triggered interrupt the interrupt may have to be disabled until a thread context can process it and clear the interrupt trigger. The function is documented as returning an error if it would block. Drivers in zephyr already do this, so if this is not ISR safe function then they need to be fixed. Signed-off-by: Joakim Andersson <joerchan@gmail.com>
1 parent 44d101a commit cfe77c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/zephyr/drivers/gpio.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,8 @@ static inline bool gpio_is_ready_dt(const struct gpio_dt_spec *spec)
845845
* not controlled directly by the GPIO module. That is, pins which are
846846
* routed to other modules such as I2C, SPI, UART.
847847
*
848+
* @funcprops \isr_ok
849+
*
848850
* @param port Pointer to device structure for the driver instance.
849851
* @param pin Pin number.
850852
* @param flags Interrupt configuration flags as defined by GPIO_INT_*.
@@ -927,6 +929,8 @@ static inline int z_impl_gpio_pin_interrupt_configure(const struct device *port,
927929
/**
928930
* @brief Configure pin interrupts from a @p gpio_dt_spec.
929931
*
932+
* @funcprops \isr_ok
933+
*
930934
* This is equivalent to:
931935
*
932936
* gpio_pin_interrupt_configure(spec->port, spec->pin, flags);

0 commit comments

Comments
 (0)