Hi,
I see a thread on LED with GPIO at link:
It has command lines:
echo 50 > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio50/direction
echo 1 > /sys/class/gpio/gpio50/value
echo 0 > /sys/class/gpio/gpio50/value
When I type "ls -al /sys/class/gpio", there is:
ls -al /sys/class/gpio
drwxr-xr-x 2 root root 0 Jul 7 18:53 .
drwxr-xr-x 54 root root 0 Jul 7 18:53 ..
--w------- 1 root root 4096 Jul 7 19:35 export
lrwxrwxrwx 1 root root 0 Jul 7 19:35 gpio50 -> ../../devices/virtual/gpio/gpio50
lrwxrwxrwx 1 root root 0 Jul 7 18:53 gpiochip0 -> ../../devices/virtual/gpio/gpiochip0
lrwxrwxrwx 1 root root 0 Jul 7 18:53 gpiochip32 -> ../../devices/virtual/gpio/gpiochip32
lrwxrwxrwx 1 root root 0 Jul 7 18:53 gpiochip64 -> ../../devices/virtual/gpio/gpiochip64
lrwxrwxrwx 1 root root 0 Jul 7 18:53 gpiochip96 -> ../../devices/virtual/gpio/gpiochip96
--w------- 1 root root 4096 Jul 7 18:53 unexport
root@am335x-evm:~# echo 1 > /sys/class/gpio/gpiochip0/valufffe
Now, I don't know what purpose of '50':
echo 50 > /sys/class/gpio/export
'echo' command here is for command input, not for terminal display, is it right?
When I replace the above with
root@am335x-evm:~# echo chip0 > /sys/class/gpio/export
-sh: echo: write error: Invalid argument
It doesn't work as the 'echo 50'
The GPIO driver page is broken now:
There are 5 LEDS on AM3358 SK: D1,D2,D3,D4,D5. Which one (D1-D5) is for GPIO 50?
Thanks,