-
In timestamping mode, read() returns the timestamp of the latest event receipt on the pin based on CLOCK_MONOTONIC, along with the pin state. This is an optional pin readout mode controlled by the GPIO_RTIOC_TS request, e.g.: struct rtdm_gpio_readout rdo; int ret, on, val; on = 1; ret = ioctl(pinfd, GPIO_RTIOC_TS, &on); ret = read(pinfd, &rdo, sizeof(rdo)); /* pin state changed to rdo.value at time rdo.timestamp */ on = 0; ret = ioctl(pinfd, GPIO_RTIOC_TS, &on); ret = read(pinfd, &val, sizeof(val)); /* pin state changed to value (time of change unspecified) */ By default, timestamping mode is disabled, which corresponds to the original behavior. Signed-off-by: Philippe Gerum <rpm@xenomai.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
d35f3e41