This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
gpio (the program), how to set an interrupt
Hi forum,
I'm trying to interface the GPIO with two push buttons. I used the cli command gpio, now I'd like to set up an interrupt so the program is idle as long as the pin change is detected.

I can't get this working. I can read the state of the pin, but if I want to set edge or  wfi, the program will exit without waiting.

I hope someone got a bit of experience to share.
Light blue words might be a link. Have you try to click on them? Big Grin

I read the C source, and the wfi and edge are not supposed to work.... Seen from the usage:
$ gpio -h
gpio: Usage: gpio -v
       gpio -h
       gpio [-g|-1] [-x extension:params] ...
       gpio [-p] <read/write/wb> ...
       gpio <read/write/pwm/mode> ...
       gpio readall/reset
       gpio unexportall/exports
       gpio export/edge/unexport ...
       gpio pwmr <range>
       gpio pwmc <divider>
       gpio load spi/i2c
       gpio unload spi/i2c
       gpio i2cd/i2cdetect
Light blue words might be a link. Have you try to click on them? Big Grin

Forum Jump:

Users browsing this thread: 1 Guest(s)