Thanks a lot Hussam!
I could not get it working using the /sys/class/gpio/gpioxx/edge. Maybe
/sys/class/gpioxx/value would work? But by modifying the sample device tree
overlay from www.hipstercircuits.com and /dev/input/event1. I was able to
get it going using the following code.
#include
I need to do something similar counting pulses generated by a hall effect
sensor in a flow meter.
Haven't started looking at it yet, if you solve this please post back to
the thread.
On Saturday, February 22, 2014 12:41:02 PM UTC-6, Dorian Levy wrote:
I want to use a hall effect motor encoder
Something like SIGIO is what I was trying to do. I was
trying signal(SIGINT, IRQHandler), but something is not
right. How do I attach it, and why do Linux enthusiasts not recommend this?
On Sun, Feb 23, 2014 at 1:40 PM, halhe...@gmail.com wrote:
Dorian,
I haven't tried any
Dorian, here's a little example. First open the file and get a file
descriptor, then use FCNTL with SETOWN command to send SIGIO to current
process. Use fcntl to set the FASYNC flag then populate the signal
structure. This code was not tested but hopefully should give you an idea
as to what to