Added software spi stuff

This commit is contained in:
2014-06-14 03:10:07 +02:00
parent 75d6df400e
commit cdffd77a38
6 changed files with 241 additions and 2 deletions

View File

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