Function wiringpi::setup_sys [] [src]

pub fn setup_sys() -> WiringPi<Sys>

This initialises the wiringPi system but uses the /sys/class/gpio interface rather than accessing the hardware directly.

This can be called as a non-root user provided the GPIO pins have been exported before-hand using the gpio program. Pin number in this mode is the native Broadcom GPIO numbers.

Note: In this mode you can only use the pins which have been exported via the /sys/class/gpio interface. You must export these pins before you call your program. You can do this in a separate shell-script, or by using the system() function from inside your program.

Also note that some functions have no effect when using this mode as they’re not currently possible to action unless called with root privileges.