Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;

Expand All @@ -16,7 +18,9 @@ public class BBBSysFs extends SysFs {
private String SYSFS_DEVICES_PATH = "/sys/devices";

public BBBSysFs() {

if (!Files.isDirectory(Paths.get(SYSFS_DEVICES_PATH))) {
SYSFS_DEVICES_PATH = "/sys/devices/platform";
}
}

public File getCapeManager() {
Expand All @@ -40,6 +44,8 @@ public int getSlotNumber(String namePattern) {
}

public boolean isSlotLoaded(int slotIndex) {
if (slotIndex == -1)
return false;
String slot = readSlots().get(slotIndex);
return slot.charAt(11) == 'L';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected void enableImpl() {

@Override
protected void disableImpl() {
driver.enableChannel(getPin().getAddress());
driver.disableChannel(getPin().getAddress());
}

}