poll method

GPIOpolling poll(
  1. int timeoutMillis
)

Polls a GPIO for the edge event configured with GPIO.setGPIOedge. For character device GPIOs, the edge event should be consumed with gpio_read_event(). For sysfs GPIOs, the edge event should be consumed with GPIO.read.

Implementation

GPIOpolling poll(int timeoutMillis) {
  _checkStatus();
  return _checkError(_nativeGPIOpoll(_gpioHandle, timeoutMillis)) == 1
      ? GPIOpolling.success
      : GPIOpolling.timeout;
}