PHP 인터페이스 PiPHP\GPIO\Interrupt\InterruptWatcherInterface

파일 보기 프로젝트 열기: piphp/gpio

공개 메소드들

메소드 설명
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.