rpi-config: Add option to enable One-wire interface

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2022-05-02 18:41:27 -07:00 committed by Andrei Gherzan
parent c97a9e34ab
commit 6afb32b00e
2 changed files with 20 additions and 0 deletions

View File

@ -350,6 +350,20 @@ to `1` or enabled `PiTFT` support, or otherwise want to use another pin, use
GPIO_SHUTDOWN_PIN = "25"
## Enable One-Wire Interface
One-wire is a single-wire communication bus typically used to connect sensors
to the RaspberryPi. The Raspberry Pi supports one-wire on any GPIO pin, but
the default is GPIO 4. To enable the one-wire interface explicitly set it in
`local.conf`
ENABLE_W1 = "1"
Once discovery is complete you can list the devices that your Raspberry Pi has
discovered via all 1-Wire busses check the interface with this command
`ls /sys/bus/w1/devices/`
## Manual additions to config.txt
The `RPI_EXTRA_CONFIG` variable can be used to manually add additional lines to

View File

@ -290,6 +290,12 @@ do_deploy() {
echo "# Enable WM8960" >> $CONFIG
echo "dtoverlay=wm8960-soundcard" >> $CONFIG
fi
# W1-GPIO - One-Wire Interface
if [ "${ENABLE_W1}" = "1" ]; then
echo "# Enable One-Wire Interface" >> $CONFIG
echo "dtoverlay=w1-gpio" >> $CONFIG
fi
}
do_deploy:append:raspberrypi3-64() {