Go to file
2014-06-12 01:57:10 +02:00
examples Armed the gpio class 2014-06-12 01:53:57 +02:00
lib bugfixes to gpiopin 2014-06-12 01:57:10 +02:00
.gitignore Initial commit 2014-06-05 02:20:22 +02:00
composer.json Implemented base of GpioMapperInterface with WiringPiMapper 2014-06-06 19:50:17 +02:00
composer.lock Added exceptions to gpio class 2014-06-12 01:21:08 +02:00
LICENSE Initial commit 2014-06-05 02:20:22 +02:00
README.md Stubbed GPIO class 2014-06-06 16:00:34 +02:00

Linux Userspace GPIO Library

  • Export and Unexport GPIO pins
  • Interrupt support (*)
  • Rewrite of NoccyLabs RaspIO

Interrupts

For interrupts to work, you need to first bind the interrupt handler, and then make sure to call on Gpio#refresh() every cycle to poll the interrupt flag on the selected pins.

$gpio = new Gpio();

$gpio->onInterrupt(Gpio::get(0), "rising", function($e) { ... });

while (..) {
    ..
    $gpio->refresh();
}