PHP Interface PiPHP\GPIO\Interrupt\InterruptWatcherInterface

Show file Open project: piphp/gpio

Public Methods

Method Description
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.

Method Details

register() public method

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() public method

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

watch() public method

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