On Tue, Mar 4, 2014 at 5:56 PM, Dorian Levy <dorianal...@gmail.com> wrote:
> If setting /sys/class/gpio/gpioxx/edge creates an interrupt in the > /proc/interrupts file, why is there no event file associated with it? What > is the best way to use a gpio pin to count the number of times a switch is > toggled? I really need to do it on two separate pins in order to ensure two > motors are spinning at the same rate. > There are counters on the eQEP blocks that can do the counting for you. ( https://github.com/Teknoman117/beaglebot/tree/master/encoders) https://developer.ridgerun.com/wiki/index.php/How_to_use_GPIO_signals has a nice discussion on sysfs GPIO interrupts, which I believe you accurately point out don't have associated event files. If you want to generate real events, use the gpio-keys driver instead. With device tree overlays, it should be simple enough to load the gpio-keys driver. Device tree bindings: https://www.kernel.org/doc/Documentation/devicetree/bindings/gpio/gpio_keys.txt Nice overall post: http://hipstercircuits.com/capture-input-events-via-gpio-on-beaglebone-black/ > > > -- > For more options, visit http://beagleboard.org/discuss > --- > You received this message because you are subscribed to the Google Groups > "BeagleBoard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to beagleboard+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.