PHP Interface PiPHP\GPIO\Interrupt\InterruptWatcherInterface

Afficher le fichier Open project: piphp/gpio

Méthodes publiques

Méthode 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 méthode

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 méthode

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

watch() public méthode

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