GPIO in the kernel: an introduction
GPIO in the kernel: an introduction
Posted Dec 15, 2016 11:07 UTC (Thu) by bla (guest, #112986)In reply to: GPIO in the kernel: an introduction by nybble41
Parent article: GPIO in the kernel: an introduction
Ok, you c a n set a combined interrupt mask and query the pin state in the ISR on an RPi, but gpio_get_value seems to have latency, which makes this approach pretty much useless in conjunction with switch bounce and the ISR time constraints.
For implementing long button presses, detecting the first flank and reading the level with a thread after some delay seems to be the better approach, it also doesn't require a state change to trigger the long press signal.
For implementing long button presses, detecting the first flank and reading the level with a thread after some delay seems to be the better approach, it also doesn't require a state change to trigger the long press signal.
