Advertisement
zmatt

gpio-demo.dtsi results

Jul 10th, 2019 (edited)
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. # see https://github.com/mvduin/overlay-utils/blob/master/gpio-demo.dtsi
  2.  
  3. ~$ ls -l /dev/gpio
  4. total 0
  5. lrwxrwxrwx 1 root root 22 Jun 29 06:34 button -> /sys/class/gpio/gpio66/
  6. lrwxrwxrwx 1 root root 22 Jun 29 06:34 input-bidi -> /sys/class/gpio/gpio69/
  7. lrwxrwxrwx 1 root root 22 Jun 29 06:34 output-bidi -> /sys/class/gpio/gpio68/
  8. lrwxrwxrwx 1 root root 22 Jun 29 06:34 reset-thing -> /sys/class/gpio/gpio67/
  9.  
  10.  
  11. ~$ ls -l /dev/gpio/*/direction
  12. -r--r--r-- 1 root gpio 4096 Jun 29 06:34 /dev/gpio/button/direction
  13. -rw-rw-r-- 1 root gpio 4096 Jun 29 06:34 /dev/gpio/input-bidi/direction
  14. -rw-rw-r-- 1 root gpio 4096 Jun 29 06:34 /dev/gpio/output-bidi/direction
  15. -r--r--r-- 1 root gpio 4096 Jun 29 06:34 /dev/gpio/reset-thing/direction
  16.  
  17. ~$ for i in /dev/gpio/*/direction; do printf '%4s %s\n' $(cat $i) $i; done
  18. in /dev/gpio/button/direction
  19. in /dev/gpio/input-bidi/direction
  20. out /dev/gpio/output-bidi/direction
  21. out /dev/gpio/reset-thing/direction
  22.  
  23.  
  24. ~$ ls -l /dev/gpio/*/value
  25. -r--r--r-- 1 root gpio 4096 Jun 29 06:34 /dev/gpio/button/value
  26. -rw-rw-r-- 1 root gpio 4096 Jun 29 06:34 /dev/gpio/input-bidi/value
  27. -rw-rw-r-- 1 root gpio 4096 Jun 29 06:34 /dev/gpio/output-bidi/value
  28. -rw-rw-r-- 1 root gpio 4096 Jun 29 06:34 /dev/gpio/reset-thing/value
  29.  
  30. ~$ for i in /dev/gpio/*/value; do printf '%4s %s\n' $(cat $i) $i; done
  31. 0 /dev/gpio/button/value
  32. 1 /dev/gpio/input-bidi/value
  33. 0 /dev/gpio/output-bidi/value
  34. 0 /dev/gpio/reset-thing/value
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement