slitaz-arm view rpi/cgi-adm/plugins/rpi_gpio/rpi_gpio.cgi @ rev 107

rpi: some nice optimization via sysctl.conf, fstab (nodiratime), /etc/modprobe.d/rpi-blacklist.conf and up cgi-adm plugin
author Christophe Lincoln <pankso@slitaz.org>
date Fri Apr 18 06:19:41 2014 +0200 (2014-04-18)
parents 01865197f1c0
children c34a9ff05fd1
line source
1 #!/bin/sh
2 #
3 # TazBerry CGI Plugin - Raspberry Pi GPIO settings
4 #
6 case " $(GET) " in
8 *\ rpi_gpio\ *)
9 sysfs="/sys/class/gpio"
10 html_header "GPIO pins"
11 cat << EOT
12 <h1>Raspberry Pi GPIO pins</h1>
14 <p>
15 The R-Pi offers GPIO lower-level interfaces intended to connect
16 more directly with chips and subsystem modules. Documentation on the:
17 <a href="http://elinux.org/RPi_Low-level_peripherals">Official Wiki</a>
18 </p>
20 <h2>$sysfs</h2>
21 <pre>
22 $(ls $sysfs)
23 </pre>
25 <h2>Export example</h2>
27 <pre>
28 # echo 24 > $sysfs/export
29 # cat $sysfs/gpio24/direction
30 </pre>
32 EOT
34 html_footer && exit 0 ;;
35 esac