The new command is called "gpio", and the syntax is based on the raspi-gpio utility. Each line applies the same settings (or at least makes the same changes) to a set of pins, either a single pin ('3'), a range ('3-4'), or a comma-separated list of either ('3-4,6,8'). The pins are followed by an '=', then one or more comma-separated attributes from this list:
Code: Select all
ip - Input
op - Output
a0-a5 - Alt0-Alt5
dh - Driving high (for outputs)
dl - Driving low (for outputs)
pu - Pull up
pd - Pull down
pn/np - No pull
Examples:
Code: Select all
# Select Alt2 for GPIOs 0 to 27 (for DPI24)
gpio=0-27=a2
# Set GPIO12 to be an output set to 1
gpio=12=op,dh
# Change the pull on (input) pins 18 and 20
gpio=18,20=pu
# Make 17 to 21 inputs
gpio=17-21=ip
The "gpio" command respects the "[...]" section headers in config.txt, so it is possible to use different settings based on the model, serial number and EDID.
You can discuss this post and ask questions here.