Merged from git.drogon.net, SPI driver helpers, C++ wrappers, softPwm, piNes, gertboard, SPI

This commit is contained in:
Gordon Henderson
2012-08-28 18:37:54 +01:00
committed by Philip Howard
parent 21f0472265
commit ae40bdaf6a
22 changed files with 1708 additions and 279 deletions

View File

@@ -4,28 +4,55 @@
gpio \- Command-line access to Raspberry Pi and PiFace GPIO
.SH SYNOPSIS
.TP
.B gpio
.RB [ \-v ]
.TP
.B \-v
.PP
.B gpio
.RB [ \-g ]
.RB < read/write/pwm/mode ...>
.TP
.B [ \-g ]
.B read/write/pwm/mode ...
.PP
.B gpio
.RB [ \-p ]
.RB < read/write/mode ...>
.TP
.B [ \-p ]
.B read/write/mode
.B ...
.PP
.B gpio
.RB < export/edge/unexport/unexportall/exports ...>
.B unexportall/exports
.PP
.B gpio
.B export/edge/unexport
.B ...
.PP
.B gpio
.B drive
group value
.PP
.B gpio
.B pwm-bal/pwm-ms
.PP
.B gpio
.B pwmr
range
.PP
.B gpio
.B load \ i2c/spi
.PP
.B gpio
.B gbr
channel
.PP
.B gpio
.B gbw
channel value
.SH DESCRIPTION
.B GPIO
is a command line tool to allow the user easy access to the GPIO pins
on the Raspberry Pi. It's designed for simple testing and diagnostic
purposes, but can be used in shell scripts for general if somewhat slow
control of the GPIO pins.
is a swiss army knofe of a command line tool to allow the user easy
access to the GPIO pins on the Raspberry Pi and the SPI A/D and D/A
convertors on the Gertboard. It's designed for simple testing and
diagnostic purposes, but can be used in shell scripts for general if
somewhat slow control of the GPIO pins.
Additionally, it can be used to set the exports in the \fI/sys/class/gpio\fR
system directory to allow subsequent programs to use the \fR/sys/class/gpio\fR
@@ -64,6 +91,14 @@ Set a pin into \fIinput\fR, \fIoutput\fR or \fIpwm\fR mode. Can also
use the literals \fIup\fR, \fIdown\fR or \fItri\fR to set the internal
pull-up, pull-down or tristate (off) controls.
.TP
.B unexportall
Un-Export all the GPIO pins in the /sys/class/gpio directory.
.TP
.B exports
Print a list (if any) of all the exported GPIO pins and their current values.
.TP
.B export
Export a GPIO pin in the \fI/sys/class/gpio\fR directory. Use like the
@@ -96,12 +131,41 @@ requiring root/sudo.
Un-Export a GPIO pin in the /sys/class/gpio directory.
.TP
.B unexportall
Un-Export all the GPIO pins in the /sys/class/gpio directory.
.B drive
group value
Change the pad driver value for the given pad group to the supplied drive
value. Group is 0, 1 or 2 and value is 0-7. Do not use unless you are
absolutely sure you know what you're doing.
.TP
.B exports
Print a list (if any) of all the exported GPIO pins and their current values.
.B pwm-bal/pwm-ms
Change the PWM mode to balanced (the default) or mark:space ratio (traditional)
.TP
.B pwmr
Change the PWM range register. The default is 1024.
.TP
.B load i2c/spi
This loads the i2c or the spi drivers into the system and changes the permissions on
the associated /dev/ entries so that the current user has access to them.
.TP
.B gbr
channel
This reads the analog to digital convertor on the Gertboard on the given
channel. The board jumpers need to be in-place to do this operation.
.TP
.B gbw
channel value
This writes the supplied value to the output channel on the Gertboards
SPI digital to analogue convertor.
The board jumpers need to be in-place to do this operation.
.SH "WiringPi vs. GPIO Pin numbering"
@@ -170,7 +234,7 @@ Gordon Henderson
.SH "REPORTING BUGS"
Report bugs to <gordon@drogon.net>
Report bugs to <projects@drogon.net>
.SH COPYRIGHT