Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Nov 2014 15:49:41 +0800
From:      Erich Dollansky <erichsfreebsdlist@alogt.com>
To:        Rui Paulo <rpaulo@me.com>
Cc:        arm@freebsd.org, embedded@freebsd.org
Subject:   Re: libgpio
Message-ID:  <20141107154941.3694a9c9@X220.alogt.com>
In-Reply-To: <B3B50210-8AE9-411A-84B1-AE6C10494149@me.com>
References:  <B3B50210-8AE9-411A-84B1-AE6C10494149@me.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Thu, 06 Nov 2014 22:41:12 -0800
Rui Paulo <rpaulo@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141107154941.3694a9c9>