Added software spi stuff
This commit is contained in:
1 parent
75d6df400e
commit
cdffd77a38
6 files changed
+241
-2
No files matched your search
+1
-2
@@ -52,8 +52,6 @@ class GpioPin
|
||||
{
|
||||
$this->pin = (int)$pin;
|
||||
$this->gpio = $gpio;
|
||||
$this->export();
|
||||
$this->hardware = $this->findHardware();
|
||||
}
|
||||
|
||||
private function findHardware()
|
||||
@@ -139,6 +137,7 @@ class GpioPin
|
||||
if (!file_exists("/sys/class/gpio/gpio{$this->pin}")) {
|
||||
throw new HardwareException("Unable to export pin {$this->pin}");
|
||||
}
|
||||
$this->hardware = $this->findHardware();
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user