Hardware Reference
In-Depth Information
Writing GPIO
Like the read function, the gpio command can write values:
$ gpio export 27 out
$ gpio −g write 27 1
$ gpio −g read 27
1
$ gpio −g write 27 0
$ gpio −g read 27
0
$ gpio unexportall
Use the -g option to specify GPIO pin numbers for the read/write commands.
Modify Drive Levels
The gpio command also enables you to alter the drive levels of the three available pads.
The following changes pad 1 to drive level 6 (from 7):
$ gpio drive 1 6
Use the pads program shown earlier in this chapter to verify the current settings:
$ gpio drive 1 6
$ ./pads
07E1002C : 0000001B 1 1 3
07E10030 : 0000001E 1 1 6
07E10034 : 0000001B 1 1 3
This kind of change should not be made lightly. If you don't have a sound reason to
change these drive levels, it is recommended that you don't.
 
Search WWH ::




Custom Search