update paths

This commit is contained in:
xdrm-brackets 2017-02-18 18:50:55 +01:00
commit 1cb0379128
5 changed files with 9 additions and 1 deletions

View File

@ -15,7 +15,7 @@
private $value;
public function __construct($pin){
if( !is_int($pin) )
if( !preg_match('@^\d+$@', $pin) )
throw new Exception("pin must be an integer");

View File

@ -22,6 +22,8 @@
/* (2) Set mode to in */
$gpio->value = Pin::GPIO_HIGH;
return 0;
}

View File

@ -22,6 +22,8 @@
/* (2) Set mode to in */
$gpio->mode = Pin::GPIO_IN;
return 0;
}

View File

@ -22,6 +22,8 @@
/* (2) Set mode to in */
$gpio->value = Pin::GPIO_LOW;
return 0;
}

View File

@ -22,6 +22,8 @@
/* (2) Set mode to in */
$gpio->mode = Pin::GPIO_OUT;
return 0;
}