Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => iMX233 => Topic started by: flipflops on February 17, 2013, 11:55:00 AM

Title: GPIOs under Arch Linux ARM Official Olimex build?
Post by: flipflops on February 17, 2013, 11:55:00 AM
I recently moved from the Arch Linux ARM "Alarm" build, as per the old Olimex build instructions to the new Arch Linux ARM Official Olimex build which fixed several things such as USB errors and VLAN support but the new build does not have the GPIOs listed under /sys/class/gpio/gpioX that were there under the old build as outlined here:

http://olimex.wordpress.com/tag/gpio/

Does anyone know how to access the GPIOs under the Arch Linux ARM Official Olimex build?

Thank you
Title: Re: GPIOs under Arch Linux ARM Official Olimex build?
Post by: flipflops on February 18, 2013, 08:14:13 PM
I figured it out. The Linux gpio support is there so to access gpio0, for example, you would:

echo 0 > /sys/class/gpio/export

Then you can set the direction with

echo out > /sys/class/gpio/gpio0/direction

and turn the pin to 3.3v with

echo 1 > /sys/class/gpio/gpio0/value