On 03/07/2018 03:02 AM, Gasper Zejn wrote:
/* Flush all pending events */
timeout.tv_sec = 1;
struct gpiod_line_event evt;
do {
printf("Flushing ...\n");
ret = gpiod_line_event_wait(input, &timeout);
if (ret < 0) {
printf("Error: could not flush pending events (errno=%i)\n",
errno);
return ret;
} else if (ret == 1) {
gpiod_line_event_read(input, &evt);
}
} while (ret == 1);
Ok, thanks! Everything seems to be working now.
I'm having difficulty compiling libgpiod on Ubuntu because apparently
/usr/include/linux/gpio.h does not exist (it's not part of the kernel
headers package, for some reason), but I'm working to resolve that.
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html