GPIOs in the userspace (for FPGA programming)
florian at openwrt.org
Sat Mar 13 04:53:13 EST 2010
Le samedi 13 mars 2010 01:24:36, Andrés Calderón a écrit :
> We are porting the xc3sprog FPGA programes to the SAKC, there are
> some example of using the Jz472x GPIOs to userspace ?
You can export the GPIOs using the gpiolib sysfs interface, so to export gpio
number N, just do something like this:
echo N > /sys/class/gpio/export
echo out > /sys/class/gpio/gpioN/direction
echo 1 > /sys/class/gpio/gpioN/value
However, if you are to program a pretty big bitstream, this will be slow and
since you are bit-banging the pins, your CPU will be almost 100% loaded with
At some point someone proposed an API to program FPGA-s from kernel space ,
which saved some context switches, but this did not go anywhere, might be time
to ressurect the thread.
>  http://sourceforge.net/projects/xc3sprog/
> Andrés Calderón
> Cel: +57 (300) 275 3666
> Email: andres.calderon at emqbit.com
> Gtalk: andresfcalderon at gmail.com
> Web: www.emqbit.com
> Qi Developer Mailing List
> Mail to list (members only): developer at lists.qi-hardware.com
> Subscribe or Unsubscribe:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: This is a digitally signed message part.
More information about the discussion