On 1/12/2014 2:44 PM, Thomas Studwell wrote:
> Charles, I didn't see any reference to 'high' being a valid 'direction'
> using the virtual GPIO pins, so I added these to the end of the setup.sh
> file.  If I get time later today or tomorrow, I'll update the script to
> process an optional 'level' parameter to the pin list rather than
> hardcoding it like this.
> 
> Included text:
> sudo -A su -c "echo 1 > /sys/class/gpio/gpio44/value"
> sudo -A su -c "echo 1 > /sys/class/gpio/gpio46/value"
> sudo -A su -c "echo 1 > /sys/class/gpio/gpio48/value"

Making me provide references, eh?  Well, OK:

https://www.kernel.org/doc/Documentation/gpio/gpio-legacy.txt

...scroll down to "Paths in Sysfs" where you will find:

    /sys/class/gpio/gpioN/

        "direction" ... reads as either "in" or "out".  This value may
                normally be written.  Writing as "out" defaults to
                initializing the value as low.  To ensure glitch free
                operation, values "low" and "high" may be written to
                configure the GPIO as an output with that initial value.

                Note that this attribute *will not exist* if the kernel
                doesn't support changing the direction of a GPIO, or
                it was exported by kernel code that didn't explicitly
                allow userspace to reconfigure this GPIO's direction.

-- 
Charles Steinkuehler
char...@steinkuehler.net

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to