help with IRQ_CONNECT(nrf52840) #34125
-
Is there possible to attach gpio pin to ext interrupt using IRQ_CONNECT() ? Or is there a way to use EXTI irqs? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
No, GPIO interrupt callbacks can be attached using the GPIO API: https://docs.zephyrproject.org/latest/reference/peripherals/gpio.html |
Beta Was this translation helpful? Give feedback.
No,
IRQ_CONNECT()
is just for generating interrupt vectors (see https://docs.zephyrproject.org/latest/reference/kernel/other/interrupts.html#implementation for details). A SoC GPIO driver would useIRQ_CONNECT()
for "attaching" a function to an IRQ vector.GPIO interrupt callbacks can be attached using the GPIO API: https://docs.zephyrproject.org/latest/reference/peripherals/gpio.html
An example of using this API can be found in the
button
sample: https://github.com/zephyrproject-rtos/zephyr/blob/master/samples/basic/button/src/main.c