Current code throws an error if a pin that is already defined in /sys/class/gpio is attempted to be opened
IMO, the default behavior should be to unexport the /sys value and proceed with /dev/*mem
I was wondering if enough people would be interested in having an 'override_sys' opt in rpio.init, and if so, would you agree that the default value should be true?
Approximate unexport code that would be added to rpio.prototype.open:
fs.writeFile('/sys/class/gpio/unexport', gpiopin, function(err) {
if (cb) return cb(err);
});
Current code throws an error if a pin that is already defined in /sys/class/gpio is attempted to be opened
IMO, the default behavior should be to unexport the /sys value and proceed with /dev/*mem
I was wondering if enough people would be interested in having an 'override_sys' opt in rpio.init, and if so, would you agree that the default value should be true?
Approximate unexport code that would be added to rpio.prototype.open:
fs.writeFile('/sys/class/gpio/unexport', gpiopin, function(err) { if (cb) return cb(err); });