mirror of
git://git.yoctoproject.org/meta-raspberrypi.git
synced 2025-07-05 21:24:45 +02:00
rpi-config: Add option to enable One-wire interface
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
c97a9e34ab
commit
6afb32b00e
|
@ -350,6 +350,20 @@ to `1` or enabled `PiTFT` support, or otherwise want to use another pin, use
|
||||||
|
|
||||||
GPIO_SHUTDOWN_PIN = "25"
|
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
|
## Manual additions to config.txt
|
||||||
|
|
||||||
The `RPI_EXTRA_CONFIG` variable can be used to manually add additional lines to
|
The `RPI_EXTRA_CONFIG` variable can be used to manually add additional lines to
|
||||||
|
|
|
@ -290,6 +290,12 @@ do_deploy() {
|
||||||
echo "# Enable WM8960" >> $CONFIG
|
echo "# Enable WM8960" >> $CONFIG
|
||||||
echo "dtoverlay=wm8960-soundcard" >> $CONFIG
|
echo "dtoverlay=wm8960-soundcard" >> $CONFIG
|
||||||
fi
|
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() {
|
do_deploy:append:raspberrypi3-64() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user