GPIO inputs on Pis?
- Reply: Dr. Rolf Jansen: "Re: GPIO inputs on Pis?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 23 Jan 2023 14:41:45 UTC
Is there support somewhere in the 13.x for other than "read current state" / "set current state"? Specifically, there is evidence in the sys/gpio.h header file that I can open up a file descriptor and then use select()/read() to grab the contents of a ring buffer of some size (presumably interrupt-posted) of events since last look, and determine if there's anything in there. Provided you're reasonably fast this might be enough to, for example, read an optical encoder that has a modest pulse rate. I see apparent review code at https://reviews.freebsd.org/D27398 from late 2020, but nothing else I can find digging around; an example (assuming it is actually implemented and works) would be helpful. Thanks in advance! -- Karl Denninger karl@denninger.net /The Market Ticker/ /[S/MIME encrypted email preferred]/