Implemented the tick handler

This commit is contained in:
2014-06-12 18:14:51 +02:00
parent e37e63980c
commit d7cfbcaf28
4 changed files with 110 additions and 5 deletions

View File

@ -57,11 +57,13 @@ class Gpio implements \ArrayAccess
$read = $this->fd_gpio;
$write = array();
$except = $read;
select($read, $write, $except, 0);
foreach($except as $fd) {
$pin = $this->getPinFromFd($fd);
$pin->doInterrupt();
if (count($read)>0) {
stream_select($read, $write, $except, 0);
foreach($except as $fd) {
$pin = $this->getPinFromFd($fd);
$pin->doInterrupt();
}
}
}