GPIO block read

Post Reply
leoanicio
Posts: 5
Joined: Mon May 07, 2018 10:03 am
languages_spoken: english, portuguese (BR)
ODROIDs: C2
Contact:

GPIO block read

Unread post by leoanicio » Mon May 07, 2018 10:06 am

Hello,

Is there any way I can read a entire GPIO block instead off the pins one by one? (C code)

I'm building a application where I need to read 16 bits in parallel mode, and at a high frequency, so reading the entire block would be much faster.

User avatar
odroid
Site Admin
Posts: 29408
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: GPIO block read

Unread post by odroid » Mon May 07, 2018 10:15 am

Try to access GPIO-X group.
https://wiki.odroid.com/odroid-c2/hardw ... _2x20_pins

Refer this code to know the GPIO-X and Y group registers address map.
https://github.com/hardkernel/wiringPi/ ... gPi.c#L612

leoanicio
Posts: 5
Joined: Mon May 07, 2018 10:03 am
languages_spoken: english, portuguese (BR)
ODROIDs: C2
Contact:

Re: GPIO block read

Unread post by leoanicio » Mon May 07, 2018 10:23 am

Tank you!

Another question, can I use the I2C pins as digital I/O?

User avatar
odroid
Site Admin
Posts: 29408
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: GPIO block read

Unread post by odroid » Mon May 07, 2018 1:54 pm

Pin #3 and #5 can work in GPIO #205 and #206 if you don't load aml_i2c.ko driver.

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 0 guests