added prgoramfpga functionality, currently gpio definitions required in /etc/rc file, will rectify in later commits

This commit is contained in:
Dhanya Maliakal
2016-09-29 10:28:27 +02:00
parent 5c81abdce0
commit 813b7ba6e7
13 changed files with 423 additions and 27 deletions

View File

@@ -0,0 +1,11 @@
add the following to /etc/rc before using programfpga command before cat motd
#registering 7th and 9th pin to linux kernel
echo 7 > /sys/class/gpio/export
echo 9 > /sys/class/gpio/export
#define direction for the linux kernel
echo in > /sys/class/gpio/gpio7/direction
echo out > /sys/class/gpio/gpio9/direction
#needed, else all write errors when server starts up, because linux tries to take control fof gpio
echo 1 > /sys/class/gpio/gpio9/value