Changes between Version 31 and Version 32 of gpio


Ignore:
Timestamp:
02/02/2022 11:56:19 PM (3 years ago)
Author:
Cale Collins
Comment:

removed double edge trigger

Legend:

Unmodified
Added
Removed
Modified
  • gpio

    v31 v32  
    621621 * Android can map Linux input events to Android key events via a !KeyLayout file - see [wiki:Android/OSDevelopment#gpio-pushbutton here] for details.
    622622
    623 === Double edge trigger
    624 
    625 OcteonTX GPIO's support double edge trigger, this will create an IRQ on both the leading and falling edge of a signal. 
    626 
    627 Here is an example using a GW6304. 
    628 
    629 Create an input GPIO and "high" GPIO, these are CPU-DIO's: 
    630 
    631 Connect Push button normally open (push-to-make switch) between leads attached to J13 pin 1 and 2.
    632 
    633 {{{#!bash
    634 #Create double edge input GPIO
    635 echo 488 > /sys/class/gpio/export
    636 echo in > /sys/class/gpio/gpio488/direction
    637 echo both > /sys/class/gpio/gpio488/edge
    638 #Create "high" GPIO
    639 echo 489 > /sys/class/gpio/export
    640 echo out > /sys/class/gpio/gpio489/direction
    641 echo 1 > /sys/class/gpio/gpio489/value
    642 }}}
    643 Watch IRQ events:
    644 {{{#!bash
    645 watch -n 0.5 cat /proc/interrupts
    646 }}}
    647 Look for "GPIO 24 Edge" IRQ count increase on both edges of signal. 
    648 
    649 Note that early revision Newport boards did not have on-board pull-ups on the off-board DIO's thus they would need to be provided off-board - see [wiki:newport/DigitalIO] for details
    650623
    651624