Described how to use /dev/gpiomem

This commit is contained in:
Stian Eikeland 2015-12-08 01:50:14 +01:00
parent 5e579e38a5
commit 896db2ee1c

View File

@ -16,6 +16,7 @@ There's a tiny bit of additional information over at my [blog](https://blog.eike
## Releases ## ## Releases ##
- 1.0.0 - Supports original rpi A/B/B+ - 1.0.0 - Supports original rpi A/B/B+
- 2.0.0 - Adds support for rpi 2, by @akramer - 2.0.0 - Adds support for rpi 2, by @akramer
- 3.0.0 - Add support for /dev/gpiomem, by @dotdoom
## Usage ## ## Usage ##
@ -80,3 +81,10 @@ Would be nice to add in the future:
- etc... - etc...
It works by memory-mapping the bcm2835 gpio range, and therefore require root/administrative-rights to run. It works by memory-mapping the bcm2835 gpio range, and therefore require root/administrative-rights to run.
## Using without root ##
This library can utilize the new [/dev/gpiomem](https://github.com/raspberrypi/linux/pull/1112/files)
memory range if available.
You will probably need to upgrade to the latest kernel (or wait for the next raspbian release) if you're missing /dev/gpiomem. You will also need to add a `gpio` group, add your user to the group, and then set up udev rules. I would recommend using [create_gpio_user_permissions.py](https://github.com/waveform80/rpi-gpio/blob/master/create_gpio_user_permissions.py) if you're unsure how to do this.