Documentation for using GPIO

Erich Dollansky erichsfreebsdlist at alogt.com
Tue Sep 30 05:02:37 UTC 2014


Hi Luiz,

On Tue, 30 Sep 2014 01:41:38 -0300
Luiz Otavio O Souza <lists.br at gmail.com> wrote:

> On 29 September 2014 21:16, Erich Dollansky wrote:
> > On Mon, 29 Sep 2014 16:27:26 -0300
> > Luiz Otavio O Souza wrote:
> >
> >> > is there some documentation available of how to use GPIO on a
> >> > Raspberry Pi B+ than man gpio, man gpioctl etc?
> >> >
> >> Unfortunately not, there is the Wiki page
> >> (https://wiki.freebsd.org/FreeBSD/GPIO) but it doesn't add much.
> >>
> > I ave read this.
> >
> >> But we can try to help you whenever possible, just post your
> >> questions and we'll try to address them.
> >
> > I am currently working on a C program which should use GPIO to
> > switch relais and read the state of switches via GPIO. I would like
> > to make this program as simple as possible by creating first a
> > layer which provides then functions like set (Pin), reset (Pin)
> > and read (Pin) only. Of course plus the things needed to open,
> > close and configure the interface.
> >
> > The best I have found until now are the sources of gpioctl. I am
> > currently looking at the source.
> >
> > Is this the best start?
> 
> You can use the excellent rpaulo's libgpio:
> 
> https://bitbucket.org/rpaulo/libgpio/src/1dfe793d0b0cd6caff2e196cf667a5c06bbade8d/libgpio.h?at=default
> 
> It provides all the GPIO low level functions in a clear and simple
> way.

this looks good too.

Erich


More information about the freebsd-arm mailing list