Fixed paths in gpio constructor
This commit is contained in:
parent
cdb8edd4e0
commit
429932bf4b
@ -30,10 +30,10 @@ class Gpio implements \ArrayAccess
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
if (!file_exists("/sys/gpio")) {
|
||||
if (!file_exists("/sys/class/gpio")) {
|
||||
throw new HardwareException("gpio sysfs is not available");
|
||||
}
|
||||
if (!is_writable("/sys/gpio/export")) {
|
||||
if (!is_writable("/sys/class/gpio/export")) {
|
||||
throw new HardwareException("gpio sysfs is not writable");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user