Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # see https://github.com/mvduin/overlay-utils/blob/master/gpio-demo.dtsi
- ~$ ls -l /dev/gpio
- total 0
- lrwxrwxrwx 1 root root 22 Jun 29 06:34 button -> /sys/class/gpio/gpio66/
- lrwxrwxrwx 1 root root 22 Jun 29 06:34 input-bidi -> /sys/class/gpio/gpio69/
- lrwxrwxrwx 1 root root 22 Jun 29 06:34 output-bidi -> /sys/class/gpio/gpio68/
- lrwxrwxrwx 1 root root 22 Jun 29 06:34 reset-thing -> /sys/class/gpio/gpio67/
- ~$ ls -l /dev/gpio/*/direction
- -r--r--r-- 1 root gpio 4096 Jun 29 06:34 /dev/gpio/button/direction
- -rw-rw-r-- 1 root gpio 4096 Jun 29 06:34 /dev/gpio/input-bidi/direction
- -rw-rw-r-- 1 root gpio 4096 Jun 29 06:34 /dev/gpio/output-bidi/direction
- -r--r--r-- 1 root gpio 4096 Jun 29 06:34 /dev/gpio/reset-thing/direction
- ~$ for i in /dev/gpio/*/direction; do printf '%4s %s\n' $(cat $i) $i; done
- in /dev/gpio/button/direction
- in /dev/gpio/input-bidi/direction
- out /dev/gpio/output-bidi/direction
- out /dev/gpio/reset-thing/direction
- ~$ ls -l /dev/gpio/*/value
- -r--r--r-- 1 root gpio 4096 Jun 29 06:34 /dev/gpio/button/value
- -rw-rw-r-- 1 root gpio 4096 Jun 29 06:34 /dev/gpio/input-bidi/value
- -rw-rw-r-- 1 root gpio 4096 Jun 29 06:34 /dev/gpio/output-bidi/value
- -rw-rw-r-- 1 root gpio 4096 Jun 29 06:34 /dev/gpio/reset-thing/value
- ~$ for i in /dev/gpio/*/value; do printf '%4s %s\n' $(cat $i) $i; done
- 0 /dev/gpio/button/value
- 1 /dev/gpio/input-bidi/value
- 0 /dev/gpio/output-bidi/value
- 0 /dev/gpio/reset-thing/value
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement