This is the area to clarify hardware specification if there's anything unclear from the datasheet. If the specification is software related, please ask in the related software section.

Native C libraries to GPIO pins?

Hello,

I just got my Up Board and have it set up and running. I want to transition a project I have been working on with the RPi 3 to the Up Board. The project is driving a large series of 32X32 RGB LED panels. In order to do this I have to trigger the GPIO pins extremely quickly to keep the display updated at 24 bpp color.

I see that some Python libraries have been ported and that is great. However, is there a native C library I can use and documentation to go with it?

thanks
iosman

Comments

  • iosman123iosman123 New Member Posts: 8

    @iosman123 said:
    Hello,

    I just got my Up Board and have it set up and running. I want to transition a project I have been working on with the RPi 3 to the Up Board. The project is driving a large series of 32X32 RGB LED panels. In order to do this I have to trigger the GPIO pins extremely quickly to keep the display updated at 24 bpp color . . .

    I see that some Python libraries have been ported and that is great. However, is there a native C library I can use and documentation to go with it?

    thanks
    iosman

    thanks my issue has been fixed.

  • rreignierrreignier New Member Posts: 2

    Hi!

    Maybe you could provide your solution to help others.

    Back to your question, because we are using an OS (Linux) to abstract the low level peripherals, the most portable solution across boards is to use the kernel interfaces.

    For the GPIO, the recommended method is to use the gpio character device: https://www.kernel.org/doc/html/latest/driver-api/gpio/index.html
    To ease the use in C, there is the libgpiod library: https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/
    Because this library uses the standard kernel interface, it works the same on the Raspberry Pi or on the UpBoard.

Sign In or Register to comment.