Re: Test if a given GPIO is interruptible #gpio #dts

Bolivar, Marti

Hello again :)

"leonardomt via Lists.Zephyrproject.Org"
<> writes:

Is there a way to detect programmatically if a given pin can be configured as interrupt using Zephyr? (e.g. some sort of a map/list or macros that I could reuse).
Are there any side effects in configuring a pin as an interrupt if it didn't have such hardware capability?
Is this information listed in a dts or yaml file or is the only
approach to search with a vendor's datasheet if a pin has an
I would say that if the hardware supports interrupts, then the Zephyr
GPIO driver for it should as well. Otherwise, it's a bug in the driver.

What I would like to do is to configure pins dynamically, so that at a
given point a GPIO pin is configured as a digital output and later on
it is configured as a digital input; if it is interruptible, use that
feature preferably, otherwise check its state in a loop.
As far as I know, in general this problem needs to be solved by knowing
the hardware. There are all sorts of GPIO chips out there.

Thank you!

Join to automatically receive all group messages.