This is a backwards-incompatible change while preparing for wiringPi version 2 support. This commit still supports wiringPi version 1. Previously the setup function - wiringPiSetup() - was called when the NIF was loaded. The downside with that approach was that wpi had to be run as root, although the nice thing was that a user wouldn't have to worry about calling setup before accessing pins. After some consideration I've (despite breaking backwards compatibility) decided to remove the setup from the NIF loading and let the user choose the method. Hopefully fixes issue #4.
…ator. Thanks to Tony Rogvall for the reminder.
to conform to the rest of the code
… code This makes it possible to for example accept atoms for input/output further on instead of solely relying on macros which makes interactive use a bit easier.
Remove the gpio_mode function, since the wiringPiGpioMode function in the WiringPi C API has been removed and replaced by new setup functions. Note that this library currently only supports wiringPiSetup(), not wiringPiSetupGpio() nor wiringPiSetupSys(). This means that it's currently only possible to use the WiringPi pin numbering scheme outlined here: https://projects.drogon.net/raspberry-pi/wiringpi/pins/