4 ms·
I suspect the author may have some experience implementing ad-hoc buttons via GPIO polling from userspace, and maybe used getch() in doing so.
by pengaru 5y ago
I suspect the author may have some experience implementing ad-hoc buttons via GPIO polling from userspace, and maybe used getch() in doing so.
- klodolph 5y agoThe thing about getch() is that there's not really one standard getch(). There's a Windows version of getch() which is compatible with, notably, Borland's version for DOS (I think), and then various people have reimplemented getch() for other systems.
- pengaru 5y agoThey might have meant to write getc() or getchar()...
- klodolph 5y agoThat would make no sense at all. I think the comparison to getch() is the natural one here.
- pengaru 5y agoI suppose, from the linux perspective going through curses for this use case, in the same sentence mentioning "debouncing" seems awkward, but it does at least provide a polling api. Honestly I have no idea what they're talking about there.