libgpio
Erich Dollansky
erichsfreebsdlist at alogt.com
Fri Nov 7 07:49:47 UTC 2014
Hi,
On Thu, 06 Nov 2014 22:41:12 -0800
Rui Paulo <rpaulo at me.com> wrote:
> Some time ago, I wrote a gpio library as a way to interact with the
> kernel gpio driver in a more sensible way (hiding the details of
> opening a /dev file, handling all the ioctls, etc.).
>
> Here's the project code:
>
> https://bitbucket.org/rpaulo/libgpio/src
>
> Here's the header file:
>
> https://bitbucket.org/rpaulo/libgpio/src/1dfe793d0b0cd6caff2e196cf667a5c06bbade8d/libgpio.h?at=default
>
> It looks like some people started using the library and I was
I am one of them.
> wondering if it would be a good candidate for the base system. I
It would.
> would rewrite gpioctl to use it and I'm open to changing the library
> API.
>
> Any comments?
The only thing I would really change is to add functions which include
the opening and closing of the port. With other words, the application
only calls something like gpio_pin_write (Name, Pin, value) or
gpio_pin_write (Pin, value) and gpio_pin_write opens and closes the
device. Plus a function to set the device name to be used for all later
calls.
Erich
More information about the freebsd-arm
mailing list