Arietta G25/GPIO Kernel IDs: Unterschied zwischen den Versionen
Aus FabLab Region Nürnberg
Mose (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „== Kernel IDs == {| class="wikitable" |- ! PINNAME !! Offset !! Pin-Nr !! KERNELID |- | PA0 || 0 || 0 || 0 |- | PA1 || 1 || 1 || 1 |- |colspan=4| ... |- | PB0…“) |
Mose (Diskussion | Beiträge) (→Shell Code: Reformatiert) |
||
Zeile 32: | Zeile 32: | ||
== Shell Code == | == Shell Code == | ||
'''root@arietta:~# echo ''<KERNELID>'' > /sys/class/gpio/export''' | |||
root@arietta:~# echo <KERNELID> > /sys/class/gpio/export | |||
'''root@arietta:~# ls -al /sys/class/gpio/pio''<PINNAME>''/''' | |||
root@arietta:~# ls -al /sys/class/gpio/pio<PINNAME>/ | total 0 | ||
total 0 | drwxr-xr-x 3 root root 0 Jan 1 02:52 . | ||
drwxr-xr-x 3 root root 0 Jan 1 02:52 . | drwxr-xr-x 4 root root 0 Jan 1 02:46 .. | ||
drwxr-xr-x 4 root root 0 Jan 1 02:46 .. | -rw-r--r-- 1 root root 4096 Jan 1 02:52 active_low | ||
-rw-r--r-- 1 root root 4096 Jan 1 02:52 active_low | lrwxrwxrwx 1 root root 0 Jan 1 02:52 device -> ../../../fffff400.gpio | ||
lrwxrwxrwx 1 root root 0 Jan 1 02:52 device -> ../../../fffff400.gpio | -rw-r--r-- 1 root root 4096 Jan 1 02:52 direction | ||
-rw-r--r-- 1 root root 4096 Jan 1 02:52 direction | -rw-r--r-- 1 root root 4096 Jan 1 02:52 edge | ||
-rw-r--r-- 1 root root 4096 Jan 1 02:52 edge | drwxr-xr-x 2 root root 0 Jan 1 02:52 power | ||
drwxr-xr-x 2 root root 0 Jan 1 02:52 power | lrwxrwxrwx 1 root root 0 Jan 1 02:46 subsystem -> ../../../../../../../class/gpio | ||
lrwxrwxrwx 1 root root 0 Jan 1 02:46 subsystem -> ../../../../../../../class/gpio | -rw-r--r-- 1 root root 4096 Jan 1 02:46 uevent | ||
-rw-r--r-- 1 root root 4096 Jan 1 02:46 uevent | -rw-r--r-- 1 root root 4096 Jan 1 02:52 value | ||
-rw-r--r-- 1 root root 4096 Jan 1 02:52 value | |||
'''root@arietta:/sys/class/gpio# echo ''<KERNELID>'' > unexport''' | |||
root@arietta:/sys/class/gpio# echo <KERNELID> > unexport | |||
'''root@arietta:/sys/class/gpio# ls -al /sys/class/gpio/pio''<PINNAME>''/''' | |||
root@arietta:/sys/class/gpio# ls -al /sys/class/gpio/pio<PINNAME>/ | ls: cannot access pio<PINNAME>/: No such file or directory | ||
ls: cannot access pio<PINNAME>/: No such file or directory | |||
Version vom 20. Oktober 2014, 21:21 Uhr
Kernel IDs
PINNAME | Offset | Pin-Nr | KERNELID |
---|---|---|---|
PA0 | 0 | 0 | 0 |
PA1 | 1 | 1 | 1 |
... | |||
PB0 | 32 | 0 | 32 |
PB1 | 32 | 1 | 33 |
... | |||
PC0 | 64 | 0 | 64 |
PC1 | 64 | 1 | 65 |
... | |||
PD0 | 96 | 0 | 96 |
PD1 | 96 | 1 | 97 |
... |
Shell Code
root@arietta:~# echo <KERNELID> > /sys/class/gpio/export root@arietta:~# ls -al /sys/class/gpio/pio<PINNAME>/ total 0 drwxr-xr-x 3 root root 0 Jan 1 02:52 . drwxr-xr-x 4 root root 0 Jan 1 02:46 .. -rw-r--r-- 1 root root 4096 Jan 1 02:52 active_low lrwxrwxrwx 1 root root 0 Jan 1 02:52 device -> ../../../fffff400.gpio -rw-r--r-- 1 root root 4096 Jan 1 02:52 direction -rw-r--r-- 1 root root 4096 Jan 1 02:52 edge drwxr-xr-x 2 root root 0 Jan 1 02:52 power lrwxrwxrwx 1 root root 0 Jan 1 02:46 subsystem -> ../../../../../../../class/gpio -rw-r--r-- 1 root root 4096 Jan 1 02:46 uevent -rw-r--r-- 1 root root 4096 Jan 1 02:52 value root@arietta:/sys/class/gpio# echo <KERNELID> > unexport root@arietta:/sys/class/gpio# ls -al /sys/class/gpio/pio<PINNAME>/ ls: cannot access pio<PINNAME>/: No such file or directory