We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

GPIO Pins and Interrupts

  • Does the Omega have the capability to attach interrupts to the GPIO pins so that interrupt code can be called on changes in pin states?

    If so, could someone point me to any references as to how this can be done? Thanks.

    I would prefer examples in C/C++ but any information would be helpful.

    I am familiar with the C/C++ code in fast-gpio and how it controls GPIO pins.
    I am assuming that any code would need:

    • A method for enabling/disabling interrupt actions on the pin(s)
    • A method of setting some interrupt vector(s) to point to the code to be executed on interrupt
    • Possibly some general method for globally enabling/disabling interrupts on the GPIO pins

  • You can take a look at this here: https://github.com/OnionIoT/gpio-irq, which is a package that's created by the blackswift team. We have been able to receive irq signal from changes in GPIO levels, however, we are still working on wrapping that with the edge file interface so that it's consistent with the the way we normally interact with the GPIO via fs.

  • @Boken-Lin Thanks for the reference. On first look, it appears that it could be of some use to me.
    However, as it stands the one .c file referenced makes reference to a lot of .h files that I have not yet tracked down. Any more useful pointers? šŸ™‚

  • @Kit-Bishop Just use this makefile to compile it into your firmware šŸ™‚


  • @Boken-Lin That was an amazingly quick response! šŸ™‚ Many thanks, I'll take a look and come back to you if I have any questions

Log in to reply

Looks like your connection to Community was lost, please wait while we try to reconnect.