IO: Fix SPI.close()

This commit is contained in:
gohai
2017-02-26 16:39:33 +01:00
parent 9025ecee4e
commit 7c49c34cce

View File

@@ -117,7 +117,7 @@ public class PWM {
// XXX: implicit clear()?
// XXX: also check GPIO
String fn = "/sys/class/pwm/" + chip + "/export";
String fn = "/sys/class/pwm/" + chip + "/unexport";
int ret = NativeInterface.writeFile(fn, Integer.toString(channel));
if (ret < 0) {
if (ret == -2) { // ENOENT