whaleygeek / pyenergenie

A python interface to the Energenie line of products
MIT License
82 stars 51 forks source link

Update gpio_rpi.c: allow non-root use #86

Closed BobSammers closed 5 years ago

BobSammers commented 7 years ago

Tries to access GPIO through the new /dev/gpiomem device in Raspbian. Allows library to be used without root permissions in Raspbian versions which support this.

Falls back to previous (i.e. root-only /dev/mem) behaviour when the newer device is not present.

Fixes: #84

whaleygeek commented 5 years ago

Sorry to have missed this PR. Another user has provided a similar PR and I merged that before I spotted this one.