AnsweredAssumed Answered

GPIO interrupt

Question asked by Huhni on Sep 25, 2017
Latest reply on Oct 20, 2017 by Huhni

Hello!

 

I have a basic question about the GPIO interface. I'm using a ADRV9361 SOM with the ADRV1CRR breakout board and I'd like to use one of the DIP switches (SW0) in my C application. The gpio file in /sys/kernel/debug already lists SW0 at gpio 968.

 

root@analog:/sys/kernel/debug# cat gpio
gpiochip0: GPIOs 906-1023, parent: platform/e000a000.gpio, zynq_gpio:
gpio-913 (                    |ulpi resetb         ) out lo
gpio-915 (                    |usb-ulpe-gpio-gate  ) out hi
gpio-960 (                    |Left                ) in  lo IRQ
gpio-961 (                    |Right               ) in  lo IRQ
gpio-962 (                    |Up                  ) in  lo IRQ
gpio-963 (                    |Down                ) in  lo IRQ
gpio-964 (                    |?                   ) out lo
gpio-965 (                    |?                   ) out lo
gpio-966 (                    |?                   ) out lo
gpio-967 (                    |?                   ) out lo
gpio-968 (                    |SW0                 ) in  hi IRQ
gpio-969 (                    |SW1                 ) in  hi IRQ
gpio-970 (                    |SW2                 ) in  hi IRQ
gpio-971 (                    |SW3                 ) in  hi IRQ
gpio-1005 (                    |sync                ) out lo
gpio-1006 (                    |reset               ) out hi
gpio-1011 (                    |ad9361-refclk-gpio-g) out hi

 

My question is how I can implement an interrupt routine in my application that is called if the state of the switch is changed. Please excuse my lack of GPIO knowlegde. I appreciate any hint.

 

Regards

Outcomes