Fixed paths in gpio constructor

This commit is contained in:
Chris 2014-06-12 01:23:52 +02:00
parent cdb8edd4e0
commit 429932bf4b
1 changed files with 2 additions and 2 deletions

View File

@ -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");
}
}