Added a clock mode to enable the GPIo pins to be set with

one of the GPCLK drivers to generate a frequency up to
19.2MHz.

Tidied some code up and added the clock functions into the gpio
utility.
This commit is contained in:
Gordon Henderson
2013-02-01 20:19:22 +00:00
parent 4ba36e247a
commit 56c77b5a2e
4 changed files with 247 additions and 133 deletions

View File

@@ -9,7 +9,7 @@ gpio \- Command-line access to Raspberry Pi and PiFace GPIO
.PP
.B gpio
.B [ \-g ]
.B read/write/wb/pwm/mode ...
.B read/write/wb/pwm/clock/mode ...
.PP
.B gpio
.B [ \-p ]
@@ -104,7 +104,13 @@ mode.
.TP
.B pwm <pin> <value>
Write a PWM value (0-1023) to the given pin.
Write a PWM value (0-1023) to the given pin. The pin needs to be put
into PWM mode first.
.TP
.B clock <pin> <frequency>
Set the output frequency on the given pin. The pin needs to be put into
clock mode first.
.TP
.B mode <pin> <mode>