We're no longer updating This wiki!!

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:gpiomem [2017/02/03 10:47]
brian.kim created
en:gpiomem [2017/02/03 14:51] (current)
brian.kim [Rootless GPIO access: /dev/gpiomem]
Line 1: Line 1:
 ===== Rootless GPIO access: /​dev/​gpiomem ===== ===== Rootless GPIO access: /​dev/​gpiomem =====
 ///​dev/​gpiomem//​ provides user with root-free access to the GPIO registers. Opening ///​dev/​gpiomem//​ device file and calling //mmap()// function will map the GPIO registers'​ memory map area to the user's pointer.\\ ///​dev/​gpiomem//​ provides user with root-free access to the GPIO registers. Opening ///​dev/​gpiomem//​ device file and calling //mmap()// function will map the GPIO registers'​ memory map area to the user's pointer.\\
-This driver is added in below'​s Ubuntu kernel versions:+This driver is available ​in below'​s Ubuntu kernel versions:
   * ODROID-C2: 3.14.79-105 kernel version or later   * ODROID-C2: 3.14.79-105 kernel version or later
   * ODROID-C0/​C1+:​ 3.10.104-182 kernel version or later   * ODROID-C0/​C1+:​ 3.10.104-182 kernel version or later
Line 38: Line 38:
   }   }
 </​code>​ </​code>​
 +
 +===== Rootless GPIO SYS-filesystem:​ /​sys/​class/​gpio =====
 +<​code>​
 +$ sudo addgroup gpio
 +$ sudo usermod -a -G gpio odroid ​   ​
 +$ cat /​etc/​udev/​rules.d/​90-odroid-sysfs.rules ​
 +</​code>​
 +
 +<​code>​
 +SUBSYSTEM=="​gpio",​ KERNEL=="​gpiochip*",​ ACTION=="​add",​ PROGRAM="/​bin/​sh -c 'chown root:gpio /​sys/​class/​gpio/​export /​sys/​class/​gpio/​unexport ; chmod 220 /​sys/​class/​gpio/​export /​sys/​class/​gpio/​unexport'"​
 +SUBSYSTEM=="​gpio",​ KERNEL=="​gpio*",​ ACTION=="​add",​ PROGRAM="/​bin/​sh -c 'chown root:gpio /​sys%p/​active_low /​sys%p/​direction /sys%p/edge /​sys%p/​value ; chmod 660 /​sys%p/​active_low /​sys%p/​direction /sys%p/edge /​sys%p/​value'"​
 +</​code>​
 +
 +
  
en/gpiomem.1486088238.txt.gz · Last modified: 2017/02/03 10:47 by brian.kim
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0