PHP Интерфейс PiPHP\GPIO\Interrupt\InterruptWatcherInterface

Показать файл Открыть проект

Открытые методы

Метод Описание
register ( PiPHP\GPIO\Pin\InputPinInterface $pin, callable $callback ) Register a callback to fire on pin interrupts. Only one callback can be registered per pin, this method will overwrite.
unregister ( PiPHP\GPIO\Pin\InputPinInterface $pin ) Unregister a pin callback.
watch ( integer $timeout ) Watch for pin interrupts.

Описание методов

register() публичный Метод

Register a callback to fire on pin interrupts. Only one callback can be registered per pin, this method will overwrite.
public register ( PiPHP\GPIO\Pin\InputPinInterface $pin, callable $callback )
$pin PiPHP\GPIO\Pin\InputPinInterface
$callback callable

unregister() публичный Метод

Unregister a pin callback.
public unregister ( PiPHP\GPIO\Pin\InputPinInterface $pin )
$pin PiPHP\GPIO\Pin\InputPinInterface

watch() публичный Метод

Watch for pin interrupts.
public watch ( integer $timeout )
$timeout integer The maximum time to watch for in milliseconds.