Implemented the tick handler

This commit is contained in:
noccy committed 2014-06-12 18:14:51 +02:00
1 parent e37e63980c
commit d7cfbcaf28
4 files changed
+110 -5

No files matched your search

+7 -5
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();
}
}
}