GPIO block read

Moderators: mdrjr, odroid

GPIO block read

Unread postby 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.
leoanicio
 
Posts: 2
Joined: Mon May 07, 2018 10:03 am
languages_spoken: english, portuguese (BR)
ODROIDs: C2

Re: GPIO block read

Unread postby 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
User avatar
odroid
Site Admin
 
Posts: 28490
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: GPIO block read

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

Tank you!

Another question, can I use the I2C pins as digital I/O?
leoanicio
 
Posts: 2
Joined: Mon May 07, 2018 10:03 am
languages_spoken: english, portuguese (BR)
ODROIDs: C2

Re: GPIO block read

Unread postby 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.
User avatar
odroid
Site Admin
 
Posts: 28490
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID


Return to Hardware and peripherals

Who is online

Users browsing this forum: No registered users and 1 guest