readEvent method
Reads the edge event that occurred with the GPIO. This method is intended for use with character device GPIOs and is unsupported by sysfs GPIOs.
Implementation
GPIOreadEvent readEvent() {
_checkStatus();
var edge = malloc<Int32>(1);
var time = malloc<Uint64>(1);
try {
_checkError(_nativeGPIOReadEvent(_gpioHandle, edge, time));
return GPIOreadEvent(GPIOedge.values[edge.value], time.value);
} finally {
malloc.free(edge);
malloc.free(time);
}
}